Version Description
- Updated - Intermediate cert priority. Please RESET and re-run SSL install form.
Download this release
Release Info
Developer | gowebsmarty |
Plugin | WP Encryption – One Click Free SSL Certificate & SSL / HTTPS Redirect to fix Insecure Content |
Version | 5.7.1 |
Comparing to | |
See all releases |
Version 5.7.1
- admin/assets/Certificate.png +0 -0
- admin/assets/DNS.png +0 -0
- admin/assets/Install.png +0 -0
- admin/assets/banner-left.png +0 -0
- admin/assets/bg.png +0 -0
- admin/assets/firewall-shield-firewall.png +0 -0
- admin/assets/firewall-shield-pro.png +0 -0
- admin/assets/go-viral.jpg +0 -0
- admin/assets/goviral-logo.png +0 -0
- admin/assets/icon.png +0 -0
- admin/assets/limited-offer.png +0 -0
- admin/assets/loader.png +0 -0
- admin/assets/logo.png +0 -0
- admin/assets/modern-addons.png +0 -0
- admin/assets/modernaddons-logo.png +0 -0
- admin/assets/multisite.png +0 -0
- admin/assets/renewal.png +0 -0
- admin/assets/symbol.png +0 -0
- admin/assets/tls.png +0 -0
- admin/assets/verified.png +0 -0
- admin/assets/wildcard.png +0 -0
- admin/css/le-admin.css +3416 -0
- admin/css/le-admin.css.map +9 -0
- admin/css/le-admin.min.css +2 -0
- admin/css/le-admin.min.css.map +9 -0
- admin/index.php +2 -0
- admin/js/le-admin.js +656 -0
- admin/js/popper.min.js +5 -0
- admin/js/tippy-bundle.iife.min.js +2 -0
- admin/le_admin.php +1885 -0
- admin/le_admin_page_wrapper.php +98 -0
- admin/le_admin_pages.php +839 -0
- cabundle/ca.crt +30 -0
- cabundle/index.php +2 -0
- classes/index.php +2 -0
- classes/le-activator.php +57 -0
- classes/le-advanced-scanner.php +381 -0
- classes/le-core.php +743 -0
- classes/le-deactivator.php +73 -0
- classes/le-forcessl.php +200 -0
- classes/le-scanner.php +54 -0
- classes/le-subdir-challenge.php +249 -0
- classes/le-trait.php +616 -0
- freemius/LICENSE.txt +674 -0
- freemius/assets/css/admin/account.css +1 -0
- freemius/assets/css/admin/add-ons.css +2 -0
- freemius/assets/css/admin/affiliation.css +1 -0
- freemius/assets/css/admin/checkout.css +1 -0
- freemius/assets/css/admin/common.css +2 -0
- freemius/assets/css/admin/connect.css +1 -0
- freemius/assets/css/admin/debug.css +1 -0
- freemius/assets/css/admin/dialog-boxes.css +2 -0
- freemius/assets/css/admin/gdpr-optin-notice.css +1 -0
- freemius/assets/css/admin/index.php +3 -0
- freemius/assets/css/admin/plugins.css +1 -0
- freemius/assets/css/customizer.css +1 -0
- freemius/assets/css/index.php +3 -0
- freemius/assets/img/index.php +3 -0
- freemius/assets/img/plugin-icon.png +0 -0
- freemius/assets/img/theme-icon.png +0 -0
- freemius/assets/index.php +3 -0
- freemius/assets/js/index.php +3 -0
- freemius/assets/js/nojquery.ba-postmessage.js +140 -0
- freemius/assets/js/nojquery.ba-postmessage.min.js +12 -0
- freemius/assets/js/postmessage.js +135 -0
- freemius/config.php +391 -0
- freemius/includes/class-freemius-abstract.php +597 -0
- freemius/includes/class-freemius.php +8909 -0
admin/assets/Certificate.png
ADDED
Binary file
|
admin/assets/DNS.png
ADDED
Binary file
|
admin/assets/Install.png
ADDED
Binary file
|
admin/assets/banner-left.png
ADDED
Binary file
|
admin/assets/bg.png
ADDED
Binary file
|
admin/assets/firewall-shield-firewall.png
ADDED
Binary file
|
admin/assets/firewall-shield-pro.png
ADDED
Binary file
|
admin/assets/go-viral.jpg
ADDED
Binary file
|
admin/assets/goviral-logo.png
ADDED
Binary file
|
admin/assets/icon.png
ADDED
Binary file
|
admin/assets/limited-offer.png
ADDED
Binary file
|
admin/assets/loader.png
ADDED
Binary file
|
admin/assets/logo.png
ADDED
Binary file
|
admin/assets/modern-addons.png
ADDED
Binary file
|
admin/assets/modernaddons-logo.png
ADDED
Binary file
|
admin/assets/multisite.png
ADDED
Binary file
|
admin/assets/renewal.png
ADDED
Binary file
|
admin/assets/symbol.png
ADDED
Binary file
|
admin/assets/tls.png
ADDED
Binary file
|
admin/assets/verified.png
ADDED
Binary file
|
admin/assets/wildcard.png
ADDED
Binary file
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.le-genform button {
|
2 |
+
background: #2585d3;
|
3 |
+
color: #fff;
|
4 |
+
border: none;
|
5 |
+
padding: 15px;
|
6 |
+
cursor: pointer;
|
7 |
+
-webkit-box-shadow: 0px 0px 5px #aaa;
|
8 |
+
box-shadow: 0px 0px 5px #aaa;
|
9 |
+
margin-top: 40px;
|
10 |
+
margin-bottom: 40px;
|
11 |
+
outline: none;
|
12 |
+
border-radius: 3px;
|
13 |
+
letter-spacing: 0.5px;
|
14 |
+
}
|
15 |
+
|
16 |
+
.le-genform button:hover {
|
17 |
+
background: #0063c7;
|
18 |
+
}
|
19 |
+
|
20 |
+
div#le-wrap {
|
21 |
+
clear: both;
|
22 |
+
-webkit-box-shadow: none;
|
23 |
+
box-shadow: none;
|
24 |
+
}
|
25 |
+
|
26 |
+
a.gws-logo {
|
27 |
+
float: right;
|
28 |
+
}
|
29 |
+
|
30 |
+
.le-inner {
|
31 |
+
display: inline-block;
|
32 |
+
padding: 0;
|
33 |
+
width: 100%;
|
34 |
+
}
|
35 |
+
|
36 |
+
#le-wrap h2 {
|
37 |
+
font-size: 26px;
|
38 |
+
margin-top: 0;
|
39 |
+
}
|
40 |
+
|
41 |
+
.le-debugger {
|
42 |
+
background: #f5f5f5;
|
43 |
+
border: 1px solid #aaa;
|
44 |
+
padding: 10px;
|
45 |
+
color: #666;
|
46 |
+
border-radius: 5px;
|
47 |
+
margin-bottom: 30px;
|
48 |
+
max-height: 500px;
|
49 |
+
overflow-y: scroll;
|
50 |
+
text-align: left;
|
51 |
+
}
|
52 |
+
|
53 |
+
form.le-genform {
|
54 |
+
text-align: center;
|
55 |
+
font-size: 18px;
|
56 |
+
}
|
57 |
+
|
58 |
+
form.le-genform input[type="email"],
|
59 |
+
.le-genform input[type="text"],
|
60 |
+
.le-genform input[type="password"] {
|
61 |
+
font-size: 20px;
|
62 |
+
width: 600px;
|
63 |
+
line-height: 50px;
|
64 |
+
text-indent: 10px;
|
65 |
+
margin-bottom: 20px;
|
66 |
+
max-width: 100%;
|
67 |
+
border: 1px solid #ddd;
|
68 |
+
}
|
69 |
+
|
70 |
+
.le-powered {
|
71 |
+
background: #f0f0f0;
|
72 |
+
color: #666;
|
73 |
+
padding: 10px;
|
74 |
+
border-radius: 5px;
|
75 |
+
margin-top: 20px;
|
76 |
+
}
|
77 |
+
|
78 |
+
a.le-highlight {
|
79 |
+
background: #0073aa;
|
80 |
+
color: #fff;
|
81 |
+
padding: 3px 6px;
|
82 |
+
text-decoration: none;
|
83 |
+
}
|
84 |
+
|
85 |
+
p.le-lineheight {
|
86 |
+
line-height: 30px;
|
87 |
+
}
|
88 |
+
|
89 |
+
a.gws-logo img {
|
90 |
+
max-width: 150px;
|
91 |
+
}
|
92 |
+
|
93 |
+
span.lecheck {
|
94 |
+
display: -webkit-inline-box;
|
95 |
+
display: -ms-inline-flexbox;
|
96 |
+
display: inline-flex;
|
97 |
+
margin-bottom: 15px;
|
98 |
+
width: 100%;
|
99 |
+
-webkit-box-align: center;
|
100 |
+
-ms-flex-align: center;
|
101 |
+
align-items: center;
|
102 |
+
-webkit-box-pack: center;
|
103 |
+
-ms-flex-pack: center;
|
104 |
+
justify-content: center;
|
105 |
+
}
|
106 |
+
|
107 |
+
.le-powered a {
|
108 |
+
color: #444;
|
109 |
+
font-weight: 600;
|
110 |
+
}
|
111 |
+
|
112 |
+
.le-debugger .error {
|
113 |
+
color: red;
|
114 |
+
}
|
115 |
+
|
116 |
+
.wple-force {
|
117 |
+
padding: 5px 20px 20px;
|
118 |
+
border-radius: 5px;
|
119 |
+
}
|
120 |
+
|
121 |
+
.wple-force p,
|
122 |
+
.wple-force label {
|
123 |
+
font-size: 15px;
|
124 |
+
}
|
125 |
+
|
126 |
+
.wple-force button {
|
127 |
+
margin: 30px 0 0;
|
128 |
+
background: #0073aa;
|
129 |
+
color: #fff;
|
130 |
+
border: none;
|
131 |
+
padding: 10px 20px;
|
132 |
+
font-size: 16px;
|
133 |
+
cursor: pointer;
|
134 |
+
line-height: 20px;
|
135 |
+
display: block;
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Buy add-on button
|
140 |
+
* since 2.0
|
141 |
+
**/
|
142 |
+
.le-buypro {
|
143 |
+
background: rgba(0, 115, 170, 0.08);
|
144 |
+
border: 2px dashed #0073aa;
|
145 |
+
text-align: center;
|
146 |
+
padding: 20px 20px 30px;
|
147 |
+
margin-bottom: 20px;
|
148 |
+
}
|
149 |
+
|
150 |
+
.le-buypro p {
|
151 |
+
color: #00405f;
|
152 |
+
font-size: 18px;
|
153 |
+
margin: 0 0 20px;
|
154 |
+
}
|
155 |
+
|
156 |
+
.le-buypro a,
|
157 |
+
.newbie a {
|
158 |
+
background: #0073aa;
|
159 |
+
color: #fff;
|
160 |
+
font-size: 18px;
|
161 |
+
text-decoration: none;
|
162 |
+
padding: 17px 20px;
|
163 |
+
font-weight: 500;
|
164 |
+
cursor: pointer;
|
165 |
+
display: inline-block;
|
166 |
+
}
|
167 |
+
|
168 |
+
.newbie a {
|
169 |
+
margin: 20px auto !important;
|
170 |
+
padding: 15px 40px;
|
171 |
+
}
|
172 |
+
|
173 |
+
.le-buypro a:hover {
|
174 |
+
background: #06628e;
|
175 |
+
}
|
176 |
+
|
177 |
+
p.le-offer {
|
178 |
+
font-weight: 600;
|
179 |
+
font-style: italic;
|
180 |
+
}
|
181 |
+
|
182 |
+
.wplerateus span {
|
183 |
+
color: #ff8d00;
|
184 |
+
font-size: 24px;
|
185 |
+
margin: 0 2px;
|
186 |
+
}
|
187 |
+
|
188 |
+
.wplerateus p {
|
189 |
+
font-size: 14px !important;
|
190 |
+
}
|
191 |
+
|
192 |
+
.wplerateus a {
|
193 |
+
font-weight: 600;
|
194 |
+
text-decoration: none;
|
195 |
+
}
|
196 |
+
|
197 |
+
li.le-expirydate b {
|
198 |
+
color: #f96868;
|
199 |
+
font-weight: bold;
|
200 |
+
letter-spacing: 1px;
|
201 |
+
}
|
202 |
+
|
203 |
+
.le-debugger.running {
|
204 |
+
position: relative;
|
205 |
+
padding-top: 50px;
|
206 |
+
}
|
207 |
+
|
208 |
+
.le-debugger.running h3 {
|
209 |
+
position: absolute;
|
210 |
+
left: 0;
|
211 |
+
top: 0;
|
212 |
+
right: 0;
|
213 |
+
margin: 0;
|
214 |
+
background: #a4a4a4;
|
215 |
+
color: #fff;
|
216 |
+
padding: 8px;
|
217 |
+
font-size: 15px;
|
218 |
+
}
|
219 |
+
|
220 |
+
.le-debugger.running h3 a {
|
221 |
+
color: #fff;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Tabbed admin layout
|
226 |
+
* Since 2.0
|
227 |
+
*/
|
228 |
+
.le-section {
|
229 |
+
padding: 20px;
|
230 |
+
background: #f9f9f9;
|
231 |
+
border: 1px solid #ddd;
|
232 |
+
display: none;
|
233 |
+
border-radius: 0;
|
234 |
+
}
|
235 |
+
|
236 |
+
.le-section-title {
|
237 |
+
padding: 15px 30px;
|
238 |
+
display: inline-block;
|
239 |
+
background: #eee;
|
240 |
+
border-radius: 7px 30px 0 0;
|
241 |
+
margin: 0 5px 0 0;
|
242 |
+
color: #666;
|
243 |
+
font-weight: 500;
|
244 |
+
cursor: pointer;
|
245 |
+
}
|
246 |
+
|
247 |
+
.le-section-title.active,
|
248 |
+
.le-section-title:hover {
|
249 |
+
background: #0073aa;
|
250 |
+
color: #fff;
|
251 |
+
}
|
252 |
+
|
253 |
+
.le-section.active {
|
254 |
+
display: block;
|
255 |
+
}
|
256 |
+
|
257 |
+
.le-section.download-certs ul {
|
258 |
+
margin: 0;
|
259 |
+
}
|
260 |
+
|
261 |
+
.le-section h3 {
|
262 |
+
margin-top: 0;
|
263 |
+
line-height: 1.4em;
|
264 |
+
}
|
265 |
+
|
266 |
+
.le-section-title[data-section=go-viral] {
|
267 |
+
background: #ccc;
|
268 |
+
color: #444;
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* since 2.1.0
|
273 |
+
*/
|
274 |
+
.wple-dismiss {
|
275 |
+
color: #bbb !important;
|
276 |
+
float: right;
|
277 |
+
cursor: pointer;
|
278 |
+
font-size: 21px !important;
|
279 |
+
}
|
280 |
+
|
281 |
+
.wple-dismiss:hover {
|
282 |
+
color: #999 !important;
|
283 |
+
}
|
284 |
+
|
285 |
+
.le-debugger.running h2 {
|
286 |
+
margin: 20px !important;
|
287 |
+
display: block;
|
288 |
+
line-height: 1.3em;
|
289 |
+
text-align: center;
|
290 |
+
color: #006300;
|
291 |
+
}
|
292 |
+
|
293 |
+
.hideheader h2 {
|
294 |
+
display: none !important;
|
295 |
+
}
|
296 |
+
|
297 |
+
/**
|
298 |
+
* since 2.4.0
|
299 |
+
*/
|
300 |
+
a.wplecompare {
|
301 |
+
background: none !important;
|
302 |
+
color: #075e88;
|
303 |
+
padding: 5px;
|
304 |
+
text-transform: uppercase;
|
305 |
+
border-bottom: 1px dashed #075e88;
|
306 |
+
font-weight: 600;
|
307 |
+
border-top: 1px dashed #075e88;
|
308 |
+
}
|
309 |
+
|
310 |
+
a.wplecompare span {
|
311 |
+
font-size: 23px;
|
312 |
+
}
|
313 |
+
|
314 |
+
.running .wple-promo {
|
315 |
+
font-size: 15px;
|
316 |
+
/* background: #006b00; */
|
317 |
+
/* color: #fff; */
|
318 |
+
padding: 8px;
|
319 |
+
text-align: center;
|
320 |
+
border: 1px dashed #006b00;
|
321 |
+
}
|
322 |
+
|
323 |
+
.running a {
|
324 |
+
font-weight: bold;
|
325 |
+
color: #006b00;
|
326 |
+
}
|
327 |
+
|
328 |
+
.running b {
|
329 |
+
font-weight: bold;
|
330 |
+
}
|
331 |
+
|
332 |
+
.wple-success-form {
|
333 |
+
background: #fff;
|
334 |
+
padding: 20px;
|
335 |
+
margin: 30px 0;
|
336 |
+
text-align: center;
|
337 |
+
border-radius: 10px;
|
338 |
+
-webkit-box-shadow: 0px 0px 10px green;
|
339 |
+
box-shadow: 0px 0px 10px green;
|
340 |
+
}
|
341 |
+
|
342 |
+
.wple-success-form h2 {
|
343 |
+
color: #0b9e0b;
|
344 |
+
line-height: 50px;
|
345 |
+
font-weight: 400;
|
346 |
+
font-size: 24px !important;
|
347 |
+
}
|
348 |
+
|
349 |
+
.wple-success-form button {
|
350 |
+
background: #149a14;
|
351 |
+
border: none;
|
352 |
+
color: #fff;
|
353 |
+
font-size: 24px;
|
354 |
+
padding: 10px 20px;
|
355 |
+
border-radius: 5px;
|
356 |
+
cursor: pointer;
|
357 |
+
}
|
358 |
+
|
359 |
+
.wple-success-form button:hover {
|
360 |
+
background: darkgreen;
|
361 |
+
}
|
362 |
+
|
363 |
+
.wple-warning-notice {
|
364 |
+
padding: 20px;
|
365 |
+
line-height: 40px;
|
366 |
+
text-align: center;
|
367 |
+
background: #fff;
|
368 |
+
margin: 40px 20px;
|
369 |
+
border-radius: 10px;
|
370 |
+
border: 2px dashed #098001;
|
371 |
+
}
|
372 |
+
|
373 |
+
.wple-warning-notice h2 {
|
374 |
+
color: #0aa524;
|
375 |
+
margin: 0;
|
376 |
+
font-size: 26px !important;
|
377 |
+
font-weight: 500;
|
378 |
+
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Since 2.5.0
|
382 |
+
* Brand new design
|
383 |
+
*/
|
384 |
+
.toplevel_page_wp_encryption #wpcontent,
|
385 |
+
.admin_page_wp_encryption_faq #wpcontent,
|
386 |
+
.admin_page_wp_encryption_howto_videos #wpcontent,
|
387 |
+
.wp-encryption_page_wp_encryption_godaddy #wpcontent,
|
388 |
+
.admin_page_wp_encryption_log #wpcontent,
|
389 |
+
[class*="wp-encryption_page"] #wpcontent {
|
390 |
+
background: #f5f5f5 url(../assets/bg.png) no-repeat top right;
|
391 |
+
background-size: 100% auto;
|
392 |
+
min-height: 600px;
|
393 |
+
}
|
394 |
+
|
395 |
+
.wple-header {
|
396 |
+
margin: 30px 20px 30px 0;
|
397 |
+
display: -webkit-box;
|
398 |
+
display: -ms-flexbox;
|
399 |
+
display: flex;
|
400 |
+
-webkit-box-align: center;
|
401 |
+
-ms-flex-align: center;
|
402 |
+
align-items: center;
|
403 |
+
-webkit-box-pack: justify;
|
404 |
+
-ms-flex-pack: justify;
|
405 |
+
justify-content: space-between;
|
406 |
+
}
|
407 |
+
|
408 |
+
#wple-upgradepro,
|
409 |
+
#wple-sslgenerator,
|
410 |
+
#wple-sslgen {
|
411 |
+
width: 1500px;
|
412 |
+
max-width: calc(100% - 60px);
|
413 |
+
margin: 0 auto 30px;
|
414 |
+
background: #fff;
|
415 |
+
border-radius: 10px;
|
416 |
+
padding: 20px;
|
417 |
+
min-height: 400px;
|
418 |
+
-webkit-box-shadow: 0px 0px 30px #ddd;
|
419 |
+
box-shadow: 0px 0px 30px #ddd;
|
420 |
+
}
|
421 |
+
|
422 |
+
.wple-compare-item {
|
423 |
+
width: 14.6%;
|
424 |
+
margin: 20px 1%;
|
425 |
+
text-align: center;
|
426 |
+
}
|
427 |
+
|
428 |
+
.wple-plan-compare {
|
429 |
+
display: -webkit-box;
|
430 |
+
display: -ms-flexbox;
|
431 |
+
display: flex;
|
432 |
+
-ms-flex-flow: wrap;
|
433 |
+
flex-flow: wrap;
|
434 |
+
margin-bottom: 20px;
|
435 |
+
}
|
436 |
+
|
437 |
+
.wple-plans span {
|
438 |
+
display: block;
|
439 |
+
font-weight: 600;
|
440 |
+
font-size: 14px;
|
441 |
+
margin: 0 5px 3px;
|
442 |
+
letter-spacing: 1px;
|
443 |
+
color: #888;
|
444 |
+
}
|
445 |
+
|
446 |
+
.wple-plans .pro {
|
447 |
+
color: #2585d3;
|
448 |
+
}
|
449 |
+
|
450 |
+
.wple-header .wple-version {
|
451 |
+
color: #aaa;
|
452 |
+
margin: 0 10px;
|
453 |
+
font-size: 16px;
|
454 |
+
line-height: 70px;
|
455 |
+
}
|
456 |
+
|
457 |
+
.wple-header img {
|
458 |
+
float: left;
|
459 |
+
}
|
460 |
+
|
461 |
+
.wple-compare-item h4 {
|
462 |
+
font-size: 15px;
|
463 |
+
margin-top: 0;
|
464 |
+
margin-bottom: 10px;
|
465 |
+
line-height: 22px;
|
466 |
+
}
|
467 |
+
|
468 |
+
.wple-compare-item span {
|
469 |
+
display: block;
|
470 |
+
font-size: 14px;
|
471 |
+
padding: 1px;
|
472 |
+
color: #2585d3;
|
473 |
+
font-weight: 400;
|
474 |
+
letter-spacing: 1px;
|
475 |
+
}
|
476 |
+
|
477 |
+
.wple-compare-item .wple-free {
|
478 |
+
color: #888;
|
479 |
+
}
|
480 |
+
|
481 |
+
.wple-compare-item img {
|
482 |
+
max-width: 100%;
|
483 |
+
width: 130px;
|
484 |
+
}
|
485 |
+
|
486 |
+
.wple-upgrade-pro a {
|
487 |
+
background: #2585d3;
|
488 |
+
font-size: 20px;
|
489 |
+
text-decoration: none;
|
490 |
+
color: #fff;
|
491 |
+
padding: 17px 25px;
|
492 |
+
display: inline-block;
|
493 |
+
text-transform: uppercase;
|
494 |
+
border-radius: 5px;
|
495 |
+
/* -webkit-box-shadow: 0px 0px 10px #aaa; */
|
496 |
+
/* box-shadow: 0px 0px 10px #aaa; */
|
497 |
+
cursor: pointer;
|
498 |
+
letter-spacing: 1px;
|
499 |
+
font-weight: 600;
|
500 |
+
margin: 5px 8px;
|
501 |
+
-webkit-box-shadow: none;
|
502 |
+
box-shadow: none;
|
503 |
+
}
|
504 |
+
|
505 |
+
.wple-upgrade-pro a:not(.wplecompare) .dashicons {
|
506 |
+
color: #fff !important;
|
507 |
+
margin-left: 5px;
|
508 |
+
}
|
509 |
+
|
510 |
+
.wple-upgrade-pro .wplecompare {
|
511 |
+
-webkit-box-shadow: none;
|
512 |
+
box-shadow: none;
|
513 |
+
color: #6087b8;
|
514 |
+
border-radius: 0;
|
515 |
+
padding: 8px 5px;
|
516 |
+
margin: 0 10px;
|
517 |
+
font-size: 14px;
|
518 |
+
line-height: 24px;
|
519 |
+
border-color: #ddd;
|
520 |
+
}
|
521 |
+
|
522 |
+
.wple-upgrade-pro {
|
523 |
+
display: -webkit-box;
|
524 |
+
display: -ms-flexbox;
|
525 |
+
display: flex;
|
526 |
+
-webkit-box-pack: center;
|
527 |
+
-ms-flex-pack: center;
|
528 |
+
justify-content: center;
|
529 |
+
-webkit-box-align: center;
|
530 |
+
-ms-flex-align: center;
|
531 |
+
align-items: center;
|
532 |
+
}
|
533 |
+
|
534 |
+
.wp-encryption_page_wp_encryption-pricing #wpcontent {
|
535 |
+
background: none !important;
|
536 |
+
}
|
537 |
+
|
538 |
+
#wple-sslgenerator {
|
539 |
+
min-height: auto;
|
540 |
+
background: none !important;
|
541 |
+
-webkit-box-shadow: none;
|
542 |
+
box-shadow: none;
|
543 |
+
}
|
544 |
+
|
545 |
+
#wple-sslgenerator .wple-success-form {
|
546 |
+
margin: 0;
|
547 |
+
}
|
548 |
+
|
549 |
+
#wple-sslgenerator .wple-success-form h2 {
|
550 |
+
margin-top: 0;
|
551 |
+
display: inline-block;
|
552 |
+
margin-bottom: 0px;
|
553 |
+
}
|
554 |
+
|
555 |
+
#wple-sslgenerator .wple-success-form h3 {
|
556 |
+
font-size: 18px;
|
557 |
+
line-height: 1.5em;
|
558 |
+
margin-bottom: 40px;
|
559 |
+
color: #027302;
|
560 |
+
}
|
561 |
+
|
562 |
+
#wple-sslgenerator .wple-success-form button {
|
563 |
+
background: none;
|
564 |
+
border: 2px solid green;
|
565 |
+
color: green;
|
566 |
+
font-weight: 500;
|
567 |
+
margin-top: 20px;
|
568 |
+
margin-bottom: 20px;
|
569 |
+
}
|
570 |
+
|
571 |
+
#wple-sslgenerator .wple-success-form ul:not(.wple-progress) li {
|
572 |
+
font-size: 18px;
|
573 |
+
margin-bottom: 10px;
|
574 |
+
color: green;
|
575 |
+
}
|
576 |
+
|
577 |
+
#wple-sslgenerator .wple-success-form span.dashicons {
|
578 |
+
color: #039154;
|
579 |
+
font-size: 50px;
|
580 |
+
width: 43px;
|
581 |
+
float: left;
|
582 |
+
}
|
583 |
+
|
584 |
+
div#wple-sslgen,
|
585 |
+
#le-wrap {
|
586 |
+
-webkit-box-shadow: 0px 0px 10px #ddd;
|
587 |
+
box-shadow: 0px 0px 10px #ddd;
|
588 |
+
}
|
589 |
+
|
590 |
+
div#wple-sslgen h2 {
|
591 |
+
margin: 20px 0 40px;
|
592 |
+
font-size: 28px;
|
593 |
+
text-align: center;
|
594 |
+
text-transform: uppercase;
|
595 |
+
font-weight: bold;
|
596 |
+
color: #555;
|
597 |
+
line-height: 1.5em;
|
598 |
+
}
|
599 |
+
|
600 |
+
div#wple-sslgen {
|
601 |
+
min-height: auto;
|
602 |
+
}
|
603 |
+
|
604 |
+
span.dashicons.dashicons-editor-help.wple-tooltip {
|
605 |
+
font-size: 28px;
|
606 |
+
display: -webkit-inline-box;
|
607 |
+
display: -ms-inline-flexbox;
|
608 |
+
display: inline-flex;
|
609 |
+
-webkit-box-align: center;
|
610 |
+
-ms-flex-align: center;
|
611 |
+
align-items: center;
|
612 |
+
-webkit-box-pack: center;
|
613 |
+
-ms-flex-pack: center;
|
614 |
+
justify-content: center;
|
615 |
+
color: #aaa;
|
616 |
+
cursor: help;
|
617 |
+
}
|
618 |
+
|
619 |
+
.toggle-debugger {
|
620 |
+
text-align: right;
|
621 |
+
margin-top: -10px;
|
622 |
+
margin-bottom: 10px;
|
623 |
+
color: green;
|
624 |
+
font-weight: 500;
|
625 |
+
cursor: pointer;
|
626 |
+
}
|
627 |
+
|
628 |
+
.toggle-debugger .rotate {
|
629 |
+
-webkit-transform: rotate(180deg);
|
630 |
+
transform: rotate(180deg);
|
631 |
+
}
|
632 |
+
|
633 |
+
/* Styling Checkbox Starts */
|
634 |
+
.checkbox-label {
|
635 |
+
display: block;
|
636 |
+
position: relative;
|
637 |
+
margin: auto;
|
638 |
+
cursor: pointer;
|
639 |
+
font-size: 22px;
|
640 |
+
line-height: 24px;
|
641 |
+
height: 24px;
|
642 |
+
width: 24px;
|
643 |
+
clear: both;
|
644 |
+
margin-right: 10px;
|
645 |
+
margin-bottom: -2px;
|
646 |
+
}
|
647 |
+
|
648 |
+
.checkbox-label input {
|
649 |
+
position: absolute;
|
650 |
+
opacity: 0;
|
651 |
+
cursor: pointer;
|
652 |
+
}
|
653 |
+
|
654 |
+
.checkbox-label .checkbox-custom {
|
655 |
+
position: absolute;
|
656 |
+
top: 0px;
|
657 |
+
left: 0px;
|
658 |
+
height: 24px;
|
659 |
+
width: 24px;
|
660 |
+
background-color: #fff;
|
661 |
+
border-radius: 5px;
|
662 |
+
transition: all 0.3s ease-out;
|
663 |
+
-webkit-transition: all 0.3s ease-out;
|
664 |
+
-moz-transition: all 0.3s ease-out;
|
665 |
+
-ms-transition: all 0.3s ease-out;
|
666 |
+
-o-transition: all 0.3s ease-out;
|
667 |
+
border: 1px solid #dddddd;
|
668 |
+
}
|
669 |
+
|
670 |
+
.checkbox-label input:checked ~ .checkbox-custom {
|
671 |
+
background-color: #FFFFFF;
|
672 |
+
border-radius: 5px;
|
673 |
+
-webkit-transform: rotate(0deg) scale(1);
|
674 |
+
transform: rotate(0deg) scale(1);
|
675 |
+
opacity: 1;
|
676 |
+
border: 1px solid #dddddd;
|
677 |
+
}
|
678 |
+
|
679 |
+
.checkbox-label .checkbox-custom::after {
|
680 |
+
position: absolute;
|
681 |
+
content: "";
|
682 |
+
left: 12px;
|
683 |
+
top: 12px;
|
684 |
+
height: 0px;
|
685 |
+
width: 0px;
|
686 |
+
border-radius: 5px;
|
687 |
+
border: solid #009BFF;
|
688 |
+
border-width: 0 3px 3px 0;
|
689 |
+
-webkit-transform: rotate(0deg) scale(0);
|
690 |
+
transform: rotate(0deg) scale(0);
|
691 |
+
opacity: 1;
|
692 |
+
transition: all 0.3s ease-out;
|
693 |
+
-webkit-transition: all 0.3s ease-out;
|
694 |
+
-moz-transition: all 0.3s ease-out;
|
695 |
+
-ms-transition: all 0.3s ease-out;
|
696 |
+
-o-transition: all 0.3s ease-out;
|
697 |
+
}
|
698 |
+
|
699 |
+
.checkbox-label input:checked ~ .checkbox-custom::after {
|
700 |
+
-webkit-transform: rotate(45deg) scale(1);
|
701 |
+
transform: rotate(45deg) scale(1);
|
702 |
+
opacity: 1;
|
703 |
+
left: 8px;
|
704 |
+
top: 3px;
|
705 |
+
width: 6px;
|
706 |
+
height: 12px;
|
707 |
+
border: solid #009BFF;
|
708 |
+
border-width: 0 2px 2px 0;
|
709 |
+
background-color: transparent;
|
710 |
+
border-radius: 0;
|
711 |
+
}
|
712 |
+
|
713 |
+
span.lecheck label {
|
714 |
+
margin: 3px 10px;
|
715 |
+
}
|
716 |
+
|
717 |
+
span.lecheck b,
|
718 |
+
span.lecheck a {
|
719 |
+
margin: 0 5px;
|
720 |
+
}
|
721 |
+
|
722 |
+
#wple-sslgenerator.error {
|
723 |
+
background: #fff !important;
|
724 |
+
color: #f14242;
|
725 |
+
font-size: 15px;
|
726 |
+
border-right: 4px solid #e80404;
|
727 |
+
border-left: 4px solid #e80404;
|
728 |
+
}
|
729 |
+
|
730 |
+
/** since 3.4.0 **/
|
731 |
+
.wple-gdaddy p {
|
732 |
+
max-width: 800px;
|
733 |
+
margin: 0 auto 40px;
|
734 |
+
text-align: center;
|
735 |
+
font-size: 16px;
|
736 |
+
}
|
737 |
+
|
738 |
+
.wple-gdaddy label {
|
739 |
+
margin-right: 10px;
|
740 |
+
font-weight: 600;
|
741 |
+
}
|
742 |
+
|
743 |
+
.wple-gdaddy {
|
744 |
+
text-align: center;
|
745 |
+
}
|
746 |
+
|
747 |
+
/** since 4.1.0 **/
|
748 |
+
/* #le-tabs-container {
|
749 |
+
display: flex;
|
750 |
+
justify-content: space-between;
|
751 |
+
} */
|
752 |
+
.le-other-plugins {
|
753 |
+
padding: 10px 0 0;
|
754 |
+
text-align: center;
|
755 |
+
}
|
756 |
+
|
757 |
+
.le-other-plugins a {
|
758 |
+
display: inline-block;
|
759 |
+
outline: none;
|
760 |
+
-webkit-box-shadow: none;
|
761 |
+
box-shadow: none;
|
762 |
+
}
|
763 |
+
|
764 |
+
.le-other-plugins img {
|
765 |
+
max-width: 100%;
|
766 |
+
}
|
767 |
+
|
768 |
+
/** since 4.4.0 **/
|
769 |
+
ul.wple-progress {
|
770 |
+
display: -webkit-box;
|
771 |
+
display: -ms-flexbox;
|
772 |
+
display: flex;
|
773 |
+
margin: 30px auto;
|
774 |
+
-webkit-box-pack: justify;
|
775 |
+
-ms-flex-pack: justify;
|
776 |
+
justify-content: space-between;
|
777 |
+
width: 90%;
|
778 |
+
position: relative;
|
779 |
+
}
|
780 |
+
|
781 |
+
ul.wple-progress li {
|
782 |
+
list-style: none;
|
783 |
+
font-size: 18px;
|
784 |
+
color: #aaa;
|
785 |
+
font-weight: 500;
|
786 |
+
padding: 10px 15px;
|
787 |
+
background: #fff;
|
788 |
+
position: relative;
|
789 |
+
}
|
790 |
+
|
791 |
+
ul.wple-progress li.prog-1 {
|
792 |
+
color: #0b9e0b;
|
793 |
+
}
|
794 |
+
|
795 |
+
ul.wple-progress li.prog-0 {
|
796 |
+
color: #da0404;
|
797 |
+
}
|
798 |
+
|
799 |
+
ul.wple-progress:before {
|
800 |
+
content: '';
|
801 |
+
height: 1px;
|
802 |
+
width: 100%;
|
803 |
+
position: absolute;
|
804 |
+
background: #ddd;
|
805 |
+
top: 46%;
|
806 |
+
}
|
807 |
+
|
808 |
+
ul.wple-progress li span {
|
809 |
+
border: 2px solid;
|
810 |
+
width: 20px;
|
811 |
+
border-radius: 50%;
|
812 |
+
display: inline-block;
|
813 |
+
height: 20px;
|
814 |
+
text-align: center;
|
815 |
+
padding: 2px;
|
816 |
+
font-size: 14px;
|
817 |
+
line-height: 20px;
|
818 |
+
}
|
819 |
+
|
820 |
+
.wple-multisite {
|
821 |
+
text-align: center;
|
822 |
+
font-size: 20px;
|
823 |
+
margin-bottom: 40px;
|
824 |
+
margin-top: -30px;
|
825 |
+
}
|
826 |
+
|
827 |
+
input.wple-domain-input {
|
828 |
+
text-transform: uppercase;
|
829 |
+
color: #888;
|
830 |
+
background: #dadada;
|
831 |
+
letter-spacing: 1px;
|
832 |
+
}
|
833 |
+
|
834 |
+
.wple-review-box {
|
835 |
+
display: -webkit-box;
|
836 |
+
display: -ms-flexbox;
|
837 |
+
display: flex;
|
838 |
+
margin-bottom: 10px;
|
839 |
+
}
|
840 |
+
|
841 |
+
.wple-review-box p {
|
842 |
+
font-size: 16px;
|
843 |
+
margin-top: 0;
|
844 |
+
padding: 2px 0;
|
845 |
+
}
|
846 |
+
|
847 |
+
.wple-review-box strong {
|
848 |
+
font-size: 17px;
|
849 |
+
margin: 7px 0 5px;
|
850 |
+
display: block;
|
851 |
+
}
|
852 |
+
|
853 |
+
.wple-review-box img {
|
854 |
+
border-radius: 50%;
|
855 |
+
}
|
856 |
+
|
857 |
+
.wple-review-box img {
|
858 |
+
float: left;
|
859 |
+
width: 60px;
|
860 |
+
height: 60px;
|
861 |
+
margin-right: 10px;
|
862 |
+
display: -webkit-inline-box;
|
863 |
+
display: -ms-inline-flexbox;
|
864 |
+
display: inline-flex;
|
865 |
+
-webkit-box-align: center;
|
866 |
+
-ms-flex-align: center;
|
867 |
+
align-items: center;
|
868 |
+
}
|
869 |
+
|
870 |
+
.wple-admin-review {
|
871 |
+
padding: 10px 15px 15px;
|
872 |
+
}
|
873 |
+
|
874 |
+
a.wplerevbtn {
|
875 |
+
background: #eee;
|
876 |
+
text-decoration: none;
|
877 |
+
padding: 7px 13px;
|
878 |
+
margin-right: 7px;
|
879 |
+
border-radius: 3px;
|
880 |
+
display: -webkit-inline-box;
|
881 |
+
display: -ms-inline-flexbox;
|
882 |
+
display: inline-flex;
|
883 |
+
-webkit-box-align: center;
|
884 |
+
-ms-flex-align: center;
|
885 |
+
align-items: center;
|
886 |
+
}
|
887 |
+
|
888 |
+
a.wple-lets-review.wplerevbtn {
|
889 |
+
background: #0073aa;
|
890 |
+
color: #fff;
|
891 |
+
}
|
892 |
+
|
893 |
+
/** 4.5.0 **/
|
894 |
+
a.wple-reset-button {
|
895 |
+
background: #c70505;
|
896 |
+
text-decoration: none;
|
897 |
+
padding: 10px 20px;
|
898 |
+
margin: 20px 0;
|
899 |
+
display: inline-block;
|
900 |
+
color: #fff;
|
901 |
+
outline: none;
|
902 |
+
-webkit-box-shadow: none;
|
903 |
+
box-shadow: none;
|
904 |
+
}
|
905 |
+
|
906 |
+
form#admin-verify-dns button {
|
907 |
+
margin-top: 10px;
|
908 |
+
background: #068f63;
|
909 |
+
border: none;
|
910 |
+
color: #fff;
|
911 |
+
padding: 10px 20px;
|
912 |
+
cursor: pointer;
|
913 |
+
}
|
914 |
+
|
915 |
+
.buttonrotate .dashicons {
|
916 |
+
-webkit-animation: infirotate 1s linear infinite forwards;
|
917 |
+
animation: infirotate 1s linear infinite forwards;
|
918 |
+
-webkit-transform-origin: center;
|
919 |
+
transform-origin: center;
|
920 |
+
margin-right: 5px;
|
921 |
+
}
|
922 |
+
|
923 |
+
form#admin-verify-dns button:disabled {
|
924 |
+
background: #666;
|
925 |
+
color: #ccc;
|
926 |
+
}
|
927 |
+
|
928 |
+
.dns-notvalid {
|
929 |
+
color: #f14242;
|
930 |
+
display: none;
|
931 |
+
}
|
932 |
+
|
933 |
+
.dns-notvalid.active {
|
934 |
+
display: block;
|
935 |
+
}
|
936 |
+
|
937 |
+
.wple-newdns {
|
938 |
+
margin: 20px 0;
|
939 |
+
background: #f5f5f5;
|
940 |
+
padding: 0 20px 20px;
|
941 |
+
border-left: 2px solid;
|
942 |
+
}
|
943 |
+
|
944 |
+
.wple-success-cols {
|
945 |
+
display: -webkit-box;
|
946 |
+
display: -ms-flexbox;
|
947 |
+
display: flex;
|
948 |
+
margin: 20px 0;
|
949 |
+
}
|
950 |
+
|
951 |
+
.wple-success-cols div {
|
952 |
+
text-align: left;
|
953 |
+
padding: 20px;
|
954 |
+
border-right: 1px solid #eee;
|
955 |
+
width: 25%;
|
956 |
+
}
|
957 |
+
|
958 |
+
.wple-success-cols h3 {
|
959 |
+
margin-bottom: 10px !important;
|
960 |
+
position: relative;
|
961 |
+
padding-bottom: 12px;
|
962 |
+
color: #039103 !important;
|
963 |
+
}
|
964 |
+
|
965 |
+
.wple-success-cols div:last-child {
|
966 |
+
border: none;
|
967 |
+
}
|
968 |
+
|
969 |
+
.wple-success-cols p {
|
970 |
+
font-size: 17px;
|
971 |
+
color: #7d7d7d;
|
972 |
+
}
|
973 |
+
|
974 |
+
.wple-success-cols h3:before {
|
975 |
+
content: '';
|
976 |
+
width: 50px;
|
977 |
+
height: 2px;
|
978 |
+
background: #eee;
|
979 |
+
position: absolute;
|
980 |
+
bottom: 0;
|
981 |
+
}
|
982 |
+
|
983 |
+
.wple-review-box.wple-reminder-notice {
|
984 |
+
color: #e03838;
|
985 |
+
}
|
986 |
+
|
987 |
+
.wple-review-box.wple-reminder-notice p strong {
|
988 |
+
display: inline-block;
|
989 |
+
margin: 0;
|
990 |
+
}
|
991 |
+
|
992 |
+
/** 4.7.0 **/
|
993 |
+
.subdir-challenges-block {
|
994 |
+
display: -webkit-box;
|
995 |
+
display: -ms-flexbox;
|
996 |
+
display: flex;
|
997 |
+
text-align: left;
|
998 |
+
}
|
999 |
+
|
1000 |
+
.manualchallenge {
|
1001 |
+
width: 48%;
|
1002 |
+
margin: 20px 1%;
|
1003 |
+
background: #fafafa;
|
1004 |
+
padding: 20px;
|
1005 |
+
border: 1px solid #ddd;
|
1006 |
+
border-radius: 10px;
|
1007 |
+
font-size: 15px;
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
.manualchallenge h3 {
|
1011 |
+
margin: -10px 0 10px -20px !important;
|
1012 |
+
font-size: 16px !important;
|
1013 |
+
padding: 3px 10px;
|
1014 |
+
background: #888;
|
1015 |
+
display: inline-block;
|
1016 |
+
color: #fff !important;
|
1017 |
+
border-radius: 0 5px 5px 0;
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
.subdir-http-challenge.manualchallenge a:not(.videolink) {
|
1021 |
+
text-decoration: none;
|
1022 |
+
color: green;
|
1023 |
+
font-size: 16px;
|
1024 |
+
display: block;
|
1025 |
+
background: #fff;
|
1026 |
+
padding: 5px;
|
1027 |
+
line-height: 30px;
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
.wple-http-manual-verify a {
|
1031 |
+
padding: 5px 5px 0 !important;
|
1032 |
+
font-weight: 500;
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
.subdir-http-challenge.manualchallenge span:not(.dashicons-video-alt) {
|
1036 |
+
font-size: 26px !important;
|
1037 |
+
width: 30px !important;
|
1038 |
+
margin: 4px 0 0 5px;
|
1039 |
+
}
|
1040 |
+
|
1041 |
+
.subdns-item {
|
1042 |
+
background: #fff;
|
1043 |
+
padding: 7px 15px;
|
1044 |
+
margin-bottom: 10px;
|
1045 |
+
line-height: 1.5em;
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
.manualchallenge button {
|
1049 |
+
border: none !important;
|
1050 |
+
padding: 0px 13px !important;
|
1051 |
+
font-size: 15px;
|
1052 |
+
background: #1e9654 !important;
|
1053 |
+
color: #fff !important;
|
1054 |
+
font-weight: normal !important;
|
1055 |
+
line-height: 35px;
|
1056 |
+
outline: none;
|
1057 |
+
margin: 10px 0 !important;
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
.manualchallenge button span,
|
1061 |
+
.subdir-http-challenge.manualchallenge button span {
|
1062 |
+
color: #fff !important;
|
1063 |
+
font-size: 24px !important;
|
1064 |
+
margin: 5px 0 !important;
|
1065 |
+
width: auto !important;
|
1066 |
+
height: 24px !important;
|
1067 |
+
}
|
1068 |
+
|
1069 |
+
.manualchallenge button:disabled {
|
1070 |
+
background: #aaa !important;
|
1071 |
+
}
|
1072 |
+
|
1073 |
+
.manualchallenge button span {
|
1074 |
+
-webkit-transform-origin: center !important;
|
1075 |
+
transform-origin: center !important;
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
.http-notvalid {
|
1079 |
+
color: #f14242;
|
1080 |
+
display: none;
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
.http-notvalid.active {
|
1084 |
+
display: block;
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
/** 4.7.1 **/
|
1088 |
+
#wple-error-popper {
|
1089 |
+
position: fixed;
|
1090 |
+
display: none;
|
1091 |
+
top: 0;
|
1092 |
+
left: 0;
|
1093 |
+
right: 0;
|
1094 |
+
bottom: 0;
|
1095 |
+
background: rgba(59, 59, 59, 0.5);
|
1096 |
+
}
|
1097 |
+
|
1098 |
+
.wple-flex {
|
1099 |
+
display: -webkit-box;
|
1100 |
+
display: -ms-flexbox;
|
1101 |
+
display: flex;
|
1102 |
+
-webkit-box-pack: center;
|
1103 |
+
-ms-flex-pack: center;
|
1104 |
+
justify-content: center;
|
1105 |
+
-webkit-box-align: center;
|
1106 |
+
-ms-flex-align: center;
|
1107 |
+
align-items: center;
|
1108 |
+
width: 100%;
|
1109 |
+
height: 100%;
|
1110 |
+
}
|
1111 |
+
|
1112 |
+
div#wple-error-popper .wple-error {
|
1113 |
+
display: inline-block;
|
1114 |
+
background: #fff;
|
1115 |
+
font-size: 21px;
|
1116 |
+
color: #ff0909;
|
1117 |
+
padding: 20px 40px;
|
1118 |
+
border-radius: 5px;
|
1119 |
+
-webkit-box-shadow: 0px 0px 10px #aaa;
|
1120 |
+
box-shadow: 0px 0px 10px #aaa;
|
1121 |
+
text-transform: uppercase;
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
.wple-flex img {
|
1125 |
+
margin-left: 150px;
|
1126 |
+
display: none;
|
1127 |
+
-webkit-animation: infirotate 1s linear infinite forwards;
|
1128 |
+
animation: infirotate 1s linear infinite forwards;
|
1129 |
+
}
|
1130 |
+
|
1131 |
+
/** Firewall Since v5.0 **/
|
1132 |
+
|
1133 |
+
.wple-error-firewall {
|
1134 |
+
background: #fafafa;
|
1135 |
+
color: #222;
|
1136 |
+
padding: 20px 15px;
|
1137 |
+
border: 1px solid #ccc;
|
1138 |
+
border-radius: 10px;
|
1139 |
+
display: -webkit-box;
|
1140 |
+
display: -ms-flexbox;
|
1141 |
+
display: flex;
|
1142 |
+
-webkit-box-pack: start;
|
1143 |
+
-ms-flex-pack: start;
|
1144 |
+
justify-content: flex-start;
|
1145 |
+
text-align: left;
|
1146 |
+
width: 96%;
|
1147 |
+
margin-left: 1%;
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
.wple-error-firewall img {
|
1151 |
+
max-width: 80px;
|
1152 |
+
margin: 5px 20px 0 10px;
|
1153 |
+
}
|
1154 |
+
|
1155 |
+
.wple-error-firewall h3 {
|
1156 |
+
font-size: 26px;
|
1157 |
+
}
|
1158 |
+
|
1159 |
+
.wple-error-firewall p {
|
1160 |
+
color: #555;
|
1161 |
+
}
|
1162 |
+
|
1163 |
+
.wple-error-firewall strong {
|
1164 |
+
color: #111;
|
1165 |
+
}
|
1166 |
+
|
1167 |
+
.wple-error-firewall a:not(.metrics) {
|
1168 |
+
text-decoration: none;
|
1169 |
+
display: inline-block;
|
1170 |
+
background: #4f4f4f;
|
1171 |
+
color: #fff;
|
1172 |
+
padding: 15px;
|
1173 |
+
font-size: 16px;
|
1174 |
+
border-radius: 3px;
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
.wple-upgrade-features {
|
1178 |
+
width: 100%;
|
1179 |
+
display: -webkit-inline-box;
|
1180 |
+
display: -ms-inline-flexbox;
|
1181 |
+
display: inline-flex;
|
1182 |
+
-webkit-box-align: center;
|
1183 |
+
-ms-flex-align: center;
|
1184 |
+
align-items: center;
|
1185 |
+
-webkit-box-pack: justify;
|
1186 |
+
-ms-flex-pack: justify;
|
1187 |
+
justify-content: space-between;
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
.wple-upgrade-features span {
|
1191 |
+
padding: 10px;
|
1192 |
+
font-size: 16px;
|
1193 |
+
line-height: 1.4em;
|
1194 |
+
color: #777;
|
1195 |
+
}
|
1196 |
+
|
1197 |
+
.wple-upgrade-features b {
|
1198 |
+
color: #333;
|
1199 |
+
font-size: 17px;
|
1200 |
+
display: inline-block;
|
1201 |
+
margin-bottom: 8px;
|
1202 |
+
}
|
1203 |
+
|
1204 |
+
.wple-error-firewall a:hover {
|
1205 |
+
background: #444;
|
1206 |
+
}
|
1207 |
+
|
1208 |
+
.wple-error-firewall > div {
|
1209 |
+
margin-right: 20px;
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
.wple-error-firewall h3 {
|
1213 |
+
color: #444 !important;
|
1214 |
+
font-size: 22px !important;
|
1215 |
+
margin: 0 0 5px !important;
|
1216 |
+
line-height: 1.3em !important;
|
1217 |
+
}
|
1218 |
+
|
1219 |
+
.wple-error-firewall p {
|
1220 |
+
margin: 5px 0;
|
1221 |
+
}
|
1222 |
+
|
1223 |
+
.wple-error-firewall span.dashicons {
|
1224 |
+
float: none !important;
|
1225 |
+
font-size: 19px !important;
|
1226 |
+
color: #fff !important;
|
1227 |
+
width: 20px !important;
|
1228 |
+
line-height: 17px;
|
1229 |
+
padding: 0;
|
1230 |
+
}
|
1231 |
+
|
1232 |
+
.wple-http-accessible {
|
1233 |
+
background: #fff;
|
1234 |
+
padding: 10px;
|
1235 |
+
margin-bottom: 10px;
|
1236 |
+
}
|
1237 |
+
|
1238 |
+
.wple-http-accessible p {
|
1239 |
+
margin-top: 0;
|
1240 |
+
margin-bottom: 5px;
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
.wple-http-accessible div {
|
1244 |
+
font-weight: 500;
|
1245 |
+
padding-bottom: 10px;
|
1246 |
+
font-size: 13px;
|
1247 |
+
color: #666;
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
.wple-http-accessible div a:focus {
|
1251 |
+
-webkit-box-shadow: none;
|
1252 |
+
box-shadow: none;
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
.wple-http-accessible div a {
|
1256 |
+
line-height: 26px !important;
|
1257 |
+
color: #777 !important;
|
1258 |
+
}
|
1259 |
+
|
1260 |
+
.wple-http-accessible div a span {
|
1261 |
+
float: none !important;
|
1262 |
+
margin: 0 !important;
|
1263 |
+
color: #777 !important;
|
1264 |
+
max-width: 20px !important;
|
1265 |
+
line-height: 20px;
|
1266 |
+
}
|
1267 |
+
|
1268 |
+
.wple-http-accessible div a span:before {
|
1269 |
+
font-size: 19px;
|
1270 |
+
}
|
1271 |
+
|
1272 |
+
.subdir-http-challenge.manualchallenge a:hover,
|
1273 |
+
.subdir-http-challenge.manualchallenge a:hover span {
|
1274 |
+
color: #555 !important;
|
1275 |
+
}
|
1276 |
+
|
1277 |
+
div#wple-upgradepro .wple-plans {
|
1278 |
+
right: 15px;
|
1279 |
+
text-align: right;
|
1280 |
+
position: absolute;
|
1281 |
+
bottom: 15px;
|
1282 |
+
opacity: 0.8;
|
1283 |
+
}
|
1284 |
+
|
1285 |
+
div#wple-upgradepro {
|
1286 |
+
position: relative;
|
1287 |
+
min-height: auto;
|
1288 |
+
}
|
1289 |
+
|
1290 |
+
.quick-refund-policy {
|
1291 |
+
text-align: center;
|
1292 |
+
color: #666;
|
1293 |
+
font-size: 18px;
|
1294 |
+
margin-top: 40px;
|
1295 |
+
}
|
1296 |
+
|
1297 |
+
.quick-refund-policy p {
|
1298 |
+
font-size: 15px;
|
1299 |
+
margin: 20px;
|
1300 |
+
font-weight: 400;
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
.quick-refund-policy strong {
|
1304 |
+
color: #333;
|
1305 |
+
text-transform: uppercase;
|
1306 |
+
}
|
1307 |
+
|
1308 |
+
.quick-refund-policy strong {
|
1309 |
+
color: #555;
|
1310 |
+
background: #f1f1f1;
|
1311 |
+
padding: 10px 20px;
|
1312 |
+
font-size: 15px;
|
1313 |
+
}
|
1314 |
+
|
1315 |
+
/** 5.1.0 **/
|
1316 |
+
.wple-single-dv-ssl {
|
1317 |
+
text-align: center;
|
1318 |
+
}
|
1319 |
+
|
1320 |
+
.wple-info-box {
|
1321 |
+
background: #f9f9f9;
|
1322 |
+
display: inline-block;
|
1323 |
+
width: 560px;
|
1324 |
+
max-width: 100%;
|
1325 |
+
margin: 0 0 20px 0;
|
1326 |
+
padding: 20px;
|
1327 |
+
border-radius: 5px;
|
1328 |
+
border: 1px solid #eee;
|
1329 |
+
}
|
1330 |
+
|
1331 |
+
.wple-info-box h3 {
|
1332 |
+
margin-top: 0;
|
1333 |
+
margin-bottom: 20px;
|
1334 |
+
}
|
1335 |
+
|
1336 |
+
.wple-info-box h3 span {
|
1337 |
+
margin-left: 5px;
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
.wple-info-box strong {
|
1341 |
+
font-size: 16px;
|
1342 |
+
color: #666;
|
1343 |
+
margin-bottom: 5px;
|
1344 |
+
display: block;
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
.wple-www {
|
1348 |
+
display: none;
|
1349 |
+
}
|
1350 |
+
|
1351 |
+
.wple-www.active {
|
1352 |
+
display: block;
|
1353 |
+
}
|
1354 |
+
|
1355 |
+
.hideit {
|
1356 |
+
display: none;
|
1357 |
+
}
|
1358 |
+
|
1359 |
+
#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid {
|
1360 |
+
float: right;
|
1361 |
+
width: auto !important;
|
1362 |
+
margin: -5px 0 0 0 !important;
|
1363 |
+
font-size: 21px !important;
|
1364 |
+
}
|
1365 |
+
|
1366 |
+
#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid a {
|
1367 |
+
text-decoration: none !important;
|
1368 |
+
font-size: 16px;
|
1369 |
+
color: #047b04;
|
1370 |
+
line-height: 30px;
|
1371 |
+
}
|
1372 |
+
|
1373 |
+
#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid span {
|
1374 |
+
font-size: 23px;
|
1375 |
+
width: 22px;
|
1376 |
+
color: #0c960c;
|
1377 |
+
line-height: 30px;
|
1378 |
+
margin-right: 5px;
|
1379 |
+
}
|
1380 |
+
|
1381 |
+
#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid a:hover,
|
1382 |
+
#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid a:hover span {
|
1383 |
+
color: #444;
|
1384 |
+
}
|
1385 |
+
|
1386 |
+
#wple-sslgenerator .manualchallenge button span {
|
1387 |
+
font-size: 21px !important;
|
1388 |
+
line-height: 25px;
|
1389 |
+
width: 22px !important;
|
1390 |
+
}
|
1391 |
+
|
1392 |
+
ul.wple-progress li a {
|
1393 |
+
text-decoration: none;
|
1394 |
+
color: inherit;
|
1395 |
+
}
|
1396 |
+
|
1397 |
+
ul.wple-progress li a:hover {
|
1398 |
+
color: #777;
|
1399 |
+
}
|
1400 |
+
|
1401 |
+
.wple-success-flex {
|
1402 |
+
display: -webkit-box;
|
1403 |
+
display: -ms-flexbox;
|
1404 |
+
display: flex;
|
1405 |
+
max-width: 90%;
|
1406 |
+
margin: 0 5%;
|
1407 |
+
}
|
1408 |
+
|
1409 |
+
.wple-success-flex-final {
|
1410 |
+
text-align: left;
|
1411 |
+
padding: 15px 30px 0 30px !important;
|
1412 |
+
}
|
1413 |
+
|
1414 |
+
ul.download-ssl-certs li {
|
1415 |
+
line-height: 1.5em;
|
1416 |
+
color: #666 !important;
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
ul.download-ssl-certs ul li a {
|
1420 |
+
padding: 3px 10px;
|
1421 |
+
font-size: 14px;
|
1422 |
+
outline: none !important;
|
1423 |
+
-webkit-box-shadow: none !important;
|
1424 |
+
box-shadow: none !important;
|
1425 |
+
}
|
1426 |
+
|
1427 |
+
ul.download-ssl-certs ul li {
|
1428 |
+
margin: 10px 8px 0px 0px !important;
|
1429 |
+
border-radius: 3px;
|
1430 |
+
}
|
1431 |
+
|
1432 |
+
.wple-success-flex {
|
1433 |
+
-ms-flex-pack: distribute;
|
1434 |
+
justify-content: space-around;
|
1435 |
+
}
|
1436 |
+
|
1437 |
+
.wple-success-flex-final {
|
1438 |
+
background: #f9f9f9;
|
1439 |
+
border: 1px solid #eee;
|
1440 |
+
display: -webkit-inline-box;
|
1441 |
+
display: -ms-inline-flexbox;
|
1442 |
+
display: inline-flex;
|
1443 |
+
-webkit-box-align: center;
|
1444 |
+
-ms-flex-align: center;
|
1445 |
+
align-items: center;
|
1446 |
+
margin-left: 20px;
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
.wple-success-cols a {
|
1450 |
+
font-weight: 500;
|
1451 |
+
color: #039154;
|
1452 |
+
text-transform: uppercase;
|
1453 |
+
text-decoration: none;
|
1454 |
+
border-bottom: 1px dotted;
|
1455 |
+
}
|
1456 |
+
|
1457 |
+
ul.download-ssl-certs ul {
|
1458 |
+
margin-left: 2px;
|
1459 |
+
}
|
1460 |
+
|
1461 |
+
div#wple-completed {
|
1462 |
+
display: -webkit-box;
|
1463 |
+
display: -ms-flexbox;
|
1464 |
+
display: flex;
|
1465 |
+
padding: 40px 60px 40px;
|
1466 |
+
}
|
1467 |
+
|
1468 |
+
.wple-completed-review {
|
1469 |
+
width: 70%;
|
1470 |
+
background: url(../assets/banner-left.png) no-repeat center right;
|
1471 |
+
}
|
1472 |
+
|
1473 |
+
.wple-completed-remaining {
|
1474 |
+
width: 30%;
|
1475 |
+
text-align: center;
|
1476 |
+
}
|
1477 |
+
|
1478 |
+
.wple-completed-review h2 {
|
1479 |
+
margin-top: 0 !important;
|
1480 |
+
text-align: left !important;
|
1481 |
+
font-size: 32px !important;
|
1482 |
+
max-width: 90%;
|
1483 |
+
color: #444 !important;
|
1484 |
+
}
|
1485 |
+
|
1486 |
+
.wple-completed-review p {
|
1487 |
+
font-size: 25px;
|
1488 |
+
color: #777;
|
1489 |
+
max-width: 90%;
|
1490 |
+
line-height: 36px;
|
1491 |
+
}
|
1492 |
+
|
1493 |
+
.wple-completed-review p span {
|
1494 |
+
margin: 0 5px;
|
1495 |
+
font-size: 27px;
|
1496 |
+
line-height: 38px;
|
1497 |
+
color: #ff8e00;
|
1498 |
+
}
|
1499 |
+
|
1500 |
+
.wple-completed-review a.letsrate {
|
1501 |
+
background: #007cb7;
|
1502 |
+
margin: 40px 0 10px;
|
1503 |
+
display: inline-block;
|
1504 |
+
padding: 13px 25px;
|
1505 |
+
color: #fff;
|
1506 |
+
text-decoration: none;
|
1507 |
+
font-size: 21px;
|
1508 |
+
line-height: 28px;
|
1509 |
+
border-radius: 5px;
|
1510 |
+
margin-top: 100px;
|
1511 |
+
letter-spacing: 1px;
|
1512 |
+
}
|
1513 |
+
|
1514 |
+
.wple-completed-review a.letsrate span {
|
1515 |
+
font-size: 28px;
|
1516 |
+
height: 30px;
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
.wple-completed-review small {
|
1520 |
+
display: block;
|
1521 |
+
font-size: 14px;
|
1522 |
+
padding-left: 37px;
|
1523 |
+
color: #aaa;
|
1524 |
+
text-transform: uppercase;
|
1525 |
+
}
|
1526 |
+
|
1527 |
+
.wple-completed-review .letsrenew {
|
1528 |
+
text-decoration: none;
|
1529 |
+
font-size: 20px;
|
1530 |
+
margin-left: 10px;
|
1531 |
+
text-transform: uppercase;
|
1532 |
+
font-weight: 500;
|
1533 |
+
color: #ea0707;
|
1534 |
+
}
|
1535 |
+
|
1536 |
+
.wple-completed-review .letsrenew.disabled {
|
1537 |
+
color: #bbb;
|
1538 |
+
}
|
1539 |
+
|
1540 |
+
.download-certs li {
|
1541 |
+
margin: 0 12px;
|
1542 |
+
text-transform: uppercase;
|
1543 |
+
}
|
1544 |
+
|
1545 |
+
.wple-circle-expires strong {
|
1546 |
+
font-size: 17px;
|
1547 |
+
margin: 10px 0;
|
1548 |
+
display: block;
|
1549 |
+
}
|
1550 |
+
|
1551 |
+
.wple-circle-expires strong b {
|
1552 |
+
color: #ea0707;
|
1553 |
+
}
|
1554 |
+
|
1555 |
+
.wple-circle-expires p {
|
1556 |
+
font-size: 15px;
|
1557 |
+
color: #777;
|
1558 |
+
}
|
1559 |
+
|
1560 |
+
.firepro {
|
1561 |
+
font-size: 17px;
|
1562 |
+
color: #218b21;
|
1563 |
+
margin-top: 20px !important;
|
1564 |
+
background: #ecffec;
|
1565 |
+
padding: 7px 10px !important;
|
1566 |
+
border-left: 2px solid;
|
1567 |
+
}
|
1568 |
+
|
1569 |
+
.firepro a {
|
1570 |
+
color: #218b27;
|
1571 |
+
font-weight: 600;
|
1572 |
+
text-decoration: none;
|
1573 |
+
border-bottom: 1px dotted;
|
1574 |
+
}
|
1575 |
+
|
1576 |
+
.wple-error-firewall.wple-procdn {
|
1577 |
+
background: none;
|
1578 |
+
border: 1px solid #eee;
|
1579 |
+
margin: 0 0 20px 0;
|
1580 |
+
width: 98%;
|
1581 |
+
}
|
1582 |
+
|
1583 |
+
.wple-success-cols.wple-three-cols div {
|
1584 |
+
width: calc(33.33% - 50px);
|
1585 |
+
}
|
1586 |
+
|
1587 |
+
div#wple-scanner {
|
1588 |
+
text-align: center;
|
1589 |
+
font-size: 20px;
|
1590 |
+
display: -webkit-box;
|
1591 |
+
display: -ms-flexbox;
|
1592 |
+
display: flex;
|
1593 |
+
-webkit-box-pack: center;
|
1594 |
+
-ms-flex-pack: center;
|
1595 |
+
justify-content: center;
|
1596 |
+
-webkit-box-align: center;
|
1597 |
+
-ms-flex-align: center;
|
1598 |
+
align-items: center;
|
1599 |
+
}
|
1600 |
+
|
1601 |
+
div#wple-scanner input {
|
1602 |
+
border: 1px solid #ccc;
|
1603 |
+
margin: 0 5px;
|
1604 |
+
padding: 10px;
|
1605 |
+
min-width: 300px;
|
1606 |
+
font-size: 16px;
|
1607 |
+
}
|
1608 |
+
|
1609 |
+
div#wple-scanner button {
|
1610 |
+
background: #0092c9;
|
1611 |
+
color: #fff;
|
1612 |
+
border: none;
|
1613 |
+
padding: 12px 20px;
|
1614 |
+
border-radius: 5px;
|
1615 |
+
cursor: pointer;
|
1616 |
+
}
|
1617 |
+
|
1618 |
+
div#wple-scanner button:disabled {
|
1619 |
+
background: #bbb !important;
|
1620 |
+
}
|
1621 |
+
|
1622 |
+
div#wple-scanner-iframe {
|
1623 |
+
height: 0px;
|
1624 |
+
overflow: hidden;
|
1625 |
+
-webkit-transition: all 0.5s ease;
|
1626 |
+
transition: all 0.5s ease;
|
1627 |
+
margin: 40px 0;
|
1628 |
+
position: relative;
|
1629 |
+
}
|
1630 |
+
|
1631 |
+
div#wple-scanner-iframe .wple-frameholder {
|
1632 |
+
width: 500px;
|
1633 |
+
height: 500px;
|
1634 |
+
border: 1px solid #ddd;
|
1635 |
+
margin: 0 auto;
|
1636 |
+
border-radius: 5px;
|
1637 |
+
}
|
1638 |
+
|
1639 |
+
div#wple-scanner-iframe .wple-frameholder iframe {
|
1640 |
+
overflow: hidden;
|
1641 |
+
}
|
1642 |
+
|
1643 |
+
div#wple-scanner-iframe .wple-scanbar {
|
1644 |
+
width: 510px;
|
1645 |
+
border: 3px solid #ddd;
|
1646 |
+
position: absolute;
|
1647 |
+
left: 50%;
|
1648 |
+
-webkit-transform: translateX(-50%);
|
1649 |
+
transform: translateX(-50%);
|
1650 |
+
border-radius: 15px;
|
1651 |
+
-webkit-animation: scanner 5s ease-in-out forwards alternate infinite;
|
1652 |
+
animation: scanner 5s ease-in-out forwards alternate infinite;
|
1653 |
+
}
|
1654 |
+
|
1655 |
+
.wple-frameholder:after {
|
1656 |
+
content: '';
|
1657 |
+
position: absolute;
|
1658 |
+
z-index: 9999;
|
1659 |
+
top: 0;
|
1660 |
+
bottom: 0;
|
1661 |
+
left: 0;
|
1662 |
+
right: 0;
|
1663 |
+
}
|
1664 |
+
|
1665 |
+
.complete.wple-scanbar {
|
1666 |
+
background: #0073aa;
|
1667 |
+
text-align: center;
|
1668 |
+
padding: 15px;
|
1669 |
+
color: #fff;
|
1670 |
+
font-size: 16px;
|
1671 |
+
font-weight: 600;
|
1672 |
+
border-width: 1px !important;
|
1673 |
+
}
|
1674 |
+
|
1675 |
+
.complete.wple-scanbar.success {
|
1676 |
+
background: #00bc28;
|
1677 |
+
}
|
1678 |
+
|
1679 |
+
div#wple-scanresults table {
|
1680 |
+
margin: 40px auto;
|
1681 |
+
}
|
1682 |
+
|
1683 |
+
div#wple-scanresults {
|
1684 |
+
text-align: center;
|
1685 |
+
}
|
1686 |
+
|
1687 |
+
div#wple-scanresults table {
|
1688 |
+
border-collapse: collapse;
|
1689 |
+
}
|
1690 |
+
|
1691 |
+
div#wple-scanresults table td,
|
1692 |
+
div#wple-scanresults table th {
|
1693 |
+
padding: 10px;
|
1694 |
+
font-size: 16px;
|
1695 |
+
text-align: left;
|
1696 |
+
border: 1px solid #ddd;
|
1697 |
+
}
|
1698 |
+
|
1699 |
+
div#wple-scanresults small {
|
1700 |
+
font-size: 14px;
|
1701 |
+
}
|
1702 |
+
|
1703 |
+
div#wple-upgradepro > strong {
|
1704 |
+
font-size: 14px;
|
1705 |
+
font-weight: 500;
|
1706 |
+
}
|
1707 |
+
|
1708 |
+
ul#wple-nav {
|
1709 |
+
text-align: right;
|
1710 |
+
}
|
1711 |
+
|
1712 |
+
ul#wple-nav li {
|
1713 |
+
display: inline-block;
|
1714 |
+
margin: 15px 5px;
|
1715 |
+
}
|
1716 |
+
|
1717 |
+
ul#wple-nav li a {
|
1718 |
+
text-decoration: none;
|
1719 |
+
color: #fff;
|
1720 |
+
font-size: 15px;
|
1721 |
+
font-weight: 400;
|
1722 |
+
padding: 8px 15px;
|
1723 |
+
background: #ffffff2e;
|
1724 |
+
border-radius: 5px;
|
1725 |
+
display: -webkit-inline-box;
|
1726 |
+
display: -ms-inline-flexbox;
|
1727 |
+
display: inline-flex;
|
1728 |
+
-webkit-box-align: center;
|
1729 |
+
-ms-flex-align: center;
|
1730 |
+
align-items: center;
|
1731 |
+
}
|
1732 |
+
|
1733 |
+
ul#wple-nav li a:hover {
|
1734 |
+
background: #ffffff59;
|
1735 |
+
}
|
1736 |
+
|
1737 |
+
ul#wple-nav li a span {
|
1738 |
+
margin-right: 5px;
|
1739 |
+
}
|
1740 |
+
|
1741 |
+
ul#wple-nav li a:focus {
|
1742 |
+
-webkit-box-shadow: none;
|
1743 |
+
box-shadow: none;
|
1744 |
+
}
|
1745 |
+
|
1746 |
+
span.wple-pmode {
|
1747 |
+
color: #ddd;
|
1748 |
+
border: 1px solid #ddd;
|
1749 |
+
padding: 2px 4px;
|
1750 |
+
border-radius: 5px;
|
1751 |
+
font-size: 10px;
|
1752 |
+
letter-spacing: 1px;
|
1753 |
+
}
|
1754 |
+
|
1755 |
+
.dashicons-update {
|
1756 |
+
font-size: 26px;
|
1757 |
+
width: 26px;
|
1758 |
+
height: 26px;
|
1759 |
+
margin: 5px -5px 0 0;
|
1760 |
+
}
|
1761 |
+
|
1762 |
+
.dashicons.keeprotating {
|
1763 |
+
-webkit-animation: infirotate 1s linear forwards infinite;
|
1764 |
+
animation: infirotate 1s linear forwards infinite;
|
1765 |
+
}
|
1766 |
+
|
1767 |
+
.wple-deact {
|
1768 |
+
padding: 10px 20px;
|
1769 |
+
background: rgba(255, 158, 158, 0.2);
|
1770 |
+
margin: -20px 20px 0;
|
1771 |
+
}
|
1772 |
+
|
1773 |
+
.hiddenplan {
|
1774 |
+
display: none !important;
|
1775 |
+
}
|
1776 |
+
|
1777 |
+
/** v5.2.6 **/
|
1778 |
+
div#wple-upgradepro > strong {
|
1779 |
+
padding: 11px 20px;
|
1780 |
+
background: #f5f5f5;
|
1781 |
+
display: inline-block !important;
|
1782 |
+
-webkit-transform: translateY(-21px);
|
1783 |
+
transform: translateY(-21px);
|
1784 |
+
border-radius: 0 0 8px 8px;
|
1785 |
+
-webkit-box-shadow: 0px 2px 10px #ddd;
|
1786 |
+
box-shadow: 0px 2px 10px #ddd;
|
1787 |
+
}
|
1788 |
+
|
1789 |
+
div#wple-upgradepro {
|
1790 |
+
text-align: center;
|
1791 |
+
}
|
1792 |
+
|
1793 |
+
li.onprocess1 {
|
1794 |
+
color: orange !important;
|
1795 |
+
}
|
1796 |
+
|
1797 |
+
ul.check-root-ssh li {
|
1798 |
+
display: inline-block;
|
1799 |
+
-webkit-box-shadow: 0 0 5px #aaa;
|
1800 |
+
box-shadow: 0 0 5px #aaa;
|
1801 |
+
font-size: 21px;
|
1802 |
+
padding: 15px 20px;
|
1803 |
+
margin: 5px 10px;
|
1804 |
+
min-width: 200px;
|
1805 |
+
color: #666;
|
1806 |
+
cursor: pointer;
|
1807 |
+
border-radius: 5px;
|
1808 |
+
}
|
1809 |
+
|
1810 |
+
ul.check-root-ssh {
|
1811 |
+
text-align: center;
|
1812 |
+
}
|
1813 |
+
|
1814 |
+
ul.check-root-ssh li:hover {
|
1815 |
+
background: #f1f1f1;
|
1816 |
+
}
|
1817 |
+
|
1818 |
+
ul.check-root-ssh li.active {
|
1819 |
+
background: #aaa;
|
1820 |
+
color: #fff;
|
1821 |
+
}
|
1822 |
+
|
1823 |
+
.rootssh-check {
|
1824 |
+
text-align: center;
|
1825 |
+
margin: 20px 0;
|
1826 |
+
}
|
1827 |
+
|
1828 |
+
.nocp-ssl-validation {
|
1829 |
+
text-align: center;
|
1830 |
+
}
|
1831 |
+
|
1832 |
+
.nocp-ssl-validation small {
|
1833 |
+
display: block;
|
1834 |
+
font-size: 13px;
|
1835 |
+
color: #777;
|
1836 |
+
}
|
1837 |
+
|
1838 |
+
.wple-validate-nossl {
|
1839 |
+
color: red;
|
1840 |
+
font-size: 16px;
|
1841 |
+
line-height: 1.5em;
|
1842 |
+
display: none;
|
1843 |
+
}
|
1844 |
+
|
1845 |
+
.wple-firewallcomplete {
|
1846 |
+
width: 70%;
|
1847 |
+
}
|
1848 |
+
|
1849 |
+
.wple-powerofcdn {
|
1850 |
+
width: 25%;
|
1851 |
+
border-left: 1px solid #ddd;
|
1852 |
+
margin-left: 1%;
|
1853 |
+
padding: 20px 2%;
|
1854 |
+
text-align: center;
|
1855 |
+
font-size: 18px;
|
1856 |
+
}
|
1857 |
+
|
1858 |
+
div#wple-sslgen.firewall-complete {
|
1859 |
+
display: -webkit-box;
|
1860 |
+
display: -ms-flexbox;
|
1861 |
+
display: flex;
|
1862 |
+
}
|
1863 |
+
|
1864 |
+
.wple-powerofcdn p {
|
1865 |
+
font-size: 16px;
|
1866 |
+
text-align: left;
|
1867 |
+
}
|
1868 |
+
|
1869 |
+
.wple-powerofcdn .dashicons {
|
1870 |
+
font-size: 100px;
|
1871 |
+
width: 100px;
|
1872 |
+
height: 100px;
|
1873 |
+
}
|
1874 |
+
|
1875 |
+
.wple-powerofcdn button {
|
1876 |
+
background: #444;
|
1877 |
+
border: none;
|
1878 |
+
}
|
1879 |
+
|
1880 |
+
.wple-powerofcdn button a {
|
1881 |
+
text-decoration: none;
|
1882 |
+
color: #fff;
|
1883 |
+
padding: 20px;
|
1884 |
+
display: inline-block;
|
1885 |
+
text-transform: uppercase;
|
1886 |
+
letter-spacing: 0.5px;
|
1887 |
+
font-size: 16px;
|
1888 |
+
}
|
1889 |
+
|
1890 |
+
.wple-powerofcdn button:hover {
|
1891 |
+
background: #555;
|
1892 |
+
}
|
1893 |
+
|
1894 |
+
.wple-powerofcdn button a:focus {
|
1895 |
+
outline: none !important;
|
1896 |
+
-webkit-box-shadow: none;
|
1897 |
+
box-shadow: none;
|
1898 |
+
}
|
1899 |
+
|
1900 |
+
.wple-powerofcdn small {
|
1901 |
+
color: #888;
|
1902 |
+
margin: 30px 0;
|
1903 |
+
display: block;
|
1904 |
+
line-height: 1.4em;
|
1905 |
+
}
|
1906 |
+
|
1907 |
+
li.spmode-dns-apply a {
|
1908 |
+
background: #dab13d;
|
1909 |
+
color: #fff;
|
1910 |
+
text-decoration: none;
|
1911 |
+
padding: 5px 10px;
|
1912 |
+
border-radius: 5px;
|
1913 |
+
font-weight: 600;
|
1914 |
+
text-transform: uppercase;
|
1915 |
+
-webkit-box-shadow: none;
|
1916 |
+
box-shadow: none;
|
1917 |
+
}
|
1918 |
+
|
1919 |
+
li.spmode-dns-apply {
|
1920 |
+
list-style: none !important;
|
1921 |
+
}
|
1922 |
+
|
1923 |
+
#firewall-dns button#firewall-dns-validate {
|
1924 |
+
margin-top: 20px;
|
1925 |
+
}
|
1926 |
+
|
1927 |
+
li.spmode-dns-apply a:hover {
|
1928 |
+
background: #82da82;
|
1929 |
+
}
|
1930 |
+
|
1931 |
+
.wple-assets-count ul {
|
1932 |
+
text-align: left;
|
1933 |
+
width: 90%;
|
1934 |
+
margin: 0 5%;
|
1935 |
+
}
|
1936 |
+
|
1937 |
+
.wple-assets-count ul li {
|
1938 |
+
margin: 5px 0;
|
1939 |
+
display: block;
|
1940 |
+
line-height: 1.5em;
|
1941 |
+
color: #777;
|
1942 |
+
font-size: 15px;
|
1943 |
+
}
|
1944 |
+
|
1945 |
+
.wple-assets-count ul li b {
|
1946 |
+
color: #e83434 !important;
|
1947 |
+
}
|
1948 |
+
|
1949 |
+
.wple-assets-count {
|
1950 |
+
background: #f5f5f5;
|
1951 |
+
padding: 10px;
|
1952 |
+
border-radius: 5px;
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
h2 .dashicons-superhero {
|
1956 |
+
font-size: 36px;
|
1957 |
+
width: 34px;
|
1958 |
+
line-height: 44px;
|
1959 |
+
height: 44px;
|
1960 |
+
}
|
1961 |
+
|
1962 |
+
.wple-circle-expires strong {
|
1963 |
+
display: inline;
|
1964 |
+
}
|
1965 |
+
|
1966 |
+
span.wple-pmode span {
|
1967 |
+
position: absolute;
|
1968 |
+
margin-top: 28px;
|
1969 |
+
margin-left: 10px;
|
1970 |
+
color: #ddd !important;
|
1971 |
+
}
|
1972 |
+
|
1973 |
+
.spmode-dns-setup {
|
1974 |
+
background: #fff;
|
1975 |
+
border: 1px solid #ddd;
|
1976 |
+
padding: 20px;
|
1977 |
+
padding-bottom: 0;
|
1978 |
+
border-radius: 10px;
|
1979 |
+
}
|
1980 |
+
|
1981 |
+
.wple-hire-expert a {
|
1982 |
+
line-height: 22px;
|
1983 |
+
text-decoration: none;
|
1984 |
+
display: inline-block;
|
1985 |
+
margin-top: 12px;
|
1986 |
+
font-size: 14px;
|
1987 |
+
color: #999;
|
1988 |
+
text-transform: uppercase;
|
1989 |
+
letter-spacing: 1px;
|
1990 |
+
max-width: 80%;
|
1991 |
+
}
|
1992 |
+
|
1993 |
+
.wple-hire-expert a:focus {
|
1994 |
+
outline: none;
|
1995 |
+
-webkit-box-shadow: none;
|
1996 |
+
box-shadow: none;
|
1997 |
+
}
|
1998 |
+
|
1999 |
+
.wple-hire-expert a:hover {
|
2000 |
+
color: #0389bc;
|
2001 |
+
}
|
2002 |
+
|
2003 |
+
div#wple-upgradepro.wple-expert-block {
|
2004 |
+
padding: 0;
|
2005 |
+
max-width: 100% !important;
|
2006 |
+
width: 1540px;
|
2007 |
+
border: 1px solid #ddd;
|
2008 |
+
}
|
2009 |
+
|
2010 |
+
.wple-expert-block h2 {
|
2011 |
+
font-size: 18px !important;
|
2012 |
+
line-height: 1.5em;
|
2013 |
+
font-weight: 700;
|
2014 |
+
margin: 0 !important;
|
2015 |
+
background: #f5f5f5;
|
2016 |
+
padding: 30px 20px;
|
2017 |
+
border-radius: 10px 0 0 10px;
|
2018 |
+
color: #757575;
|
2019 |
+
}
|
2020 |
+
|
2021 |
+
.wple-expert-block p {
|
2022 |
+
text-align: left;
|
2023 |
+
padding: 0 20px;
|
2024 |
+
font-size: 15px;
|
2025 |
+
margin: 0;
|
2026 |
+
}
|
2027 |
+
|
2028 |
+
.wple-expert-actions .wple-expert-more {
|
2029 |
+
font-size: 13px;
|
2030 |
+
padding: 0;
|
2031 |
+
background: none !important;
|
2032 |
+
color: #888;
|
2033 |
+
-webkit-box-shadow: none;
|
2034 |
+
box-shadow: none;
|
2035 |
+
line-height: 22px;
|
2036 |
+
font-weight: 400;
|
2037 |
+
}
|
2038 |
+
|
2039 |
+
.wple-expert-actions .wple-expert-more span:before {
|
2040 |
+
color: #888;
|
2041 |
+
}
|
2042 |
+
|
2043 |
+
a.wple-expert-hire {
|
2044 |
+
background: none;
|
2045 |
+
color: #0389bc;
|
2046 |
+
font-weight: 500;
|
2047 |
+
border: 2px solid #0389bc;
|
2048 |
+
-webkit-box-shadow: none;
|
2049 |
+
box-shadow: none;
|
2050 |
+
font-size: 15px;
|
2051 |
+
line-height: 1.5em;
|
2052 |
+
padding: 10px 25px;
|
2053 |
+
min-width: 100px;
|
2054 |
+
}
|
2055 |
+
|
2056 |
+
a.wple-expert-hire:hover {
|
2057 |
+
color: #fff;
|
2058 |
+
background: #0389bc;
|
2059 |
+
}
|
2060 |
+
|
2061 |
+
.wple-firewallcomplete .wple-expert-block {
|
2062 |
+
margin: 20px 0 !important;
|
2063 |
+
-webkit-box-shadow: none !important;
|
2064 |
+
box-shadow: none !important;
|
2065 |
+
}
|
2066 |
+
|
2067 |
+
.wple-firewallcomplete .wple-expert-block h2 {
|
2068 |
+
font-size: 16px !important;
|
2069 |
+
margin: 0 !important;
|
2070 |
+
}
|
2071 |
+
|
2072 |
+
.wple-firewallcomplete .wple-expert-block p {
|
2073 |
+
font-size: 15px;
|
2074 |
+
}
|
2075 |
+
|
2076 |
+
.wple-firewallcomplete .wple-expert-block .wple-expert-hire {
|
2077 |
+
font-size: 14px;
|
2078 |
+
padding: 10px 7px;
|
2079 |
+
}
|
2080 |
+
|
2081 |
+
.wple-firewallcomplete .wple-expert-block .wple-expert-actions {
|
2082 |
+
width: 400px;
|
2083 |
+
}
|
2084 |
+
|
2085 |
+
.wple-deact {
|
2086 |
+
margin: -20px 0px 0;
|
2087 |
+
border-radius: 5px;
|
2088 |
+
}
|
2089 |
+
|
2090 |
+
.firewall-complete #wple-completed {
|
2091 |
+
padding: 30px 40px;
|
2092 |
+
}
|
2093 |
+
|
2094 |
+
.firewall-complete a.wple-expert-hire {
|
2095 |
+
margin: 5px 0 !important;
|
2096 |
+
padding: 10px 20px !important;
|
2097 |
+
}
|
2098 |
+
|
2099 |
+
span.wple-pmode.notproerror {
|
2100 |
+
border-color: red;
|
2101 |
+
color: red;
|
2102 |
+
font-weight: 600;
|
2103 |
+
text-transform: capitalize;
|
2104 |
+
}
|
2105 |
+
|
2106 |
+
.wple-http-manual-verify {
|
2107 |
+
padding-bottom: 0px !important;
|
2108 |
+
}
|
2109 |
+
|
2110 |
+
/** 5.3.16 **/
|
2111 |
+
ul.step3-download .le-dwnld .dashicons {
|
2112 |
+
float: right !important;
|
2113 |
+
}
|
2114 |
+
|
2115 |
+
ul.step3-download .le-dwnld .dashicons:before {
|
2116 |
+
font-size: 24px !important;
|
2117 |
+
}
|
2118 |
+
|
2119 |
+
ul.step3-download .le-dwnld a {
|
2120 |
+
text-decoration: none;
|
2121 |
+
padding: 0 !important;
|
2122 |
+
}
|
2123 |
+
|
2124 |
+
ul.step3-download .le-dwnld {
|
2125 |
+
display: -webkit-box;
|
2126 |
+
display: -ms-flexbox;
|
2127 |
+
display: flex;
|
2128 |
+
-webkit-box-align: center;
|
2129 |
+
-ms-flex-align: center;
|
2130 |
+
align-items: center;
|
2131 |
+
background: #fefefe;
|
2132 |
+
padding: 10px 10px 10px 15px;
|
2133 |
+
border: 1px solid #f1f1f1;
|
2134 |
+
-webkit-box-pack: justify;
|
2135 |
+
-ms-flex-pack: justify;
|
2136 |
+
justify-content: space-between;
|
2137 |
+
border-radius: 3px;
|
2138 |
+
font-weight: 500;
|
2139 |
+
font-size: 16px !important;
|
2140 |
+
}
|
2141 |
+
|
2142 |
+
span.copy-dwnld-icons {
|
2143 |
+
display: inline-block;
|
2144 |
+
}
|
2145 |
+
|
2146 |
+
ul.step3-download .le-dwnld .dashicons {
|
2147 |
+
font-size: 24px !important;
|
2148 |
+
width: 30px !important;
|
2149 |
+
cursor: pointer;
|
2150 |
+
color: #666 !important;
|
2151 |
+
}
|
2152 |
+
|
2153 |
+
ul.step3-download .le-dwnld .dashicons:hover {
|
2154 |
+
color: green !important;
|
2155 |
+
}
|
2156 |
+
|
2157 |
+
ul.step3-download {
|
2158 |
+
margin-bottom: 20px;
|
2159 |
+
}
|
2160 |
+
|
2161 |
+
.crt-content textarea {
|
2162 |
+
width: 100%;
|
2163 |
+
height: 150px;
|
2164 |
+
background: none;
|
2165 |
+
border: 1px solid #ddd;
|
2166 |
+
display: none;
|
2167 |
+
}
|
2168 |
+
|
2169 |
+
.copied-success {
|
2170 |
+
position: fixed;
|
2171 |
+
z-index: 9999;
|
2172 |
+
top: 50%;
|
2173 |
+
left: calc(50% - 80px);
|
2174 |
+
background: rgba(0, 0, 0, 0.7);
|
2175 |
+
color: #fff;
|
2176 |
+
padding: 15px 20px;
|
2177 |
+
border-radius: 10px;
|
2178 |
+
display: none;
|
2179 |
+
}
|
2180 |
+
|
2181 |
+
/** v5.4.1 ***/
|
2182 |
+
.wple-no-certs {
|
2183 |
+
font-size: 16px;
|
2184 |
+
background: #f5f5f5;
|
2185 |
+
padding: 15px;
|
2186 |
+
border-left: 5px solid #e81e1e;
|
2187 |
+
}
|
2188 |
+
|
2189 |
+
.wple-other-content {
|
2190 |
+
width: 100%;
|
2191 |
+
}
|
2192 |
+
|
2193 |
+
.wple-other-plugins {
|
2194 |
+
display: none;
|
2195 |
+
}
|
2196 |
+
|
2197 |
+
div#wple-sslgen.wple-subpages {
|
2198 |
+
display: -webkit-box;
|
2199 |
+
display: -ms-flexbox;
|
2200 |
+
display: flex;
|
2201 |
+
-webkit-box-pack: justify;
|
2202 |
+
-ms-flex-pack: justify;
|
2203 |
+
justify-content: space-between;
|
2204 |
+
}
|
2205 |
+
|
2206 |
+
.wple-other-plugins img {
|
2207 |
+
max-width: 100px;
|
2208 |
+
margin-right: 20px;
|
2209 |
+
}
|
2210 |
+
|
2211 |
+
.wple-other-plugins div a {
|
2212 |
+
display: -webkit-inline-box;
|
2213 |
+
display: -ms-inline-flexbox;
|
2214 |
+
display: inline-flex;
|
2215 |
+
-ms-flex-line-pack: center;
|
2216 |
+
align-content: center;
|
2217 |
+
-webkit-box-align: center;
|
2218 |
+
-ms-flex-align: center;
|
2219 |
+
align-items: center;
|
2220 |
+
margin: 0 0 10px 0;
|
2221 |
+
background: #f5f5f5;
|
2222 |
+
padding: 15px 20px;
|
2223 |
+
width: calc(100% - 40px);
|
2224 |
+
text-decoration: none;
|
2225 |
+
}
|
2226 |
+
|
2227 |
+
.wple-other-plugins div a:hover {
|
2228 |
+
background: #f1f1f1;
|
2229 |
+
}
|
2230 |
+
|
2231 |
+
.wple-other-plugins h3 {
|
2232 |
+
text-transform: uppercase;
|
2233 |
+
font-size: 14px;
|
2234 |
+
}
|
2235 |
+
|
2236 |
+
ul#wple-debug-errors {
|
2237 |
+
text-align: left;
|
2238 |
+
margin: 20px 15px 0 15px;
|
2239 |
+
}
|
2240 |
+
|
2241 |
+
ul#wple-debug-errors li {
|
2242 |
+
line-height: 1.5em;
|
2243 |
+
font-size: 15px !important;
|
2244 |
+
color: #a20101 !important;
|
2245 |
+
margin-bottom: 15px !important;
|
2246 |
+
background: rgba(255, 0, 0, 0.08);
|
2247 |
+
padding: 15px;
|
2248 |
+
border-radius: 3px;
|
2249 |
+
}
|
2250 |
+
|
2251 |
+
label.disabled {
|
2252 |
+
color: #999;
|
2253 |
+
}
|
2254 |
+
|
2255 |
+
/** 5.5.0 **/
|
2256 |
+
.wple-ssl-score,
|
2257 |
+
.wple-ssl-settings {
|
2258 |
+
background: #fff;
|
2259 |
+
-webkit-box-shadow: 0px 0px 10px #ddd;
|
2260 |
+
box-shadow: 0px 0px 10px #ddd;
|
2261 |
+
padding: 30px;
|
2262 |
+
border-radius: 5px;
|
2263 |
+
margin: 10px;
|
2264 |
+
}
|
2265 |
+
|
2266 |
+
.wple-ssl-score h2,
|
2267 |
+
.wple-ssl-settings h2 {
|
2268 |
+
margin-top: 0;
|
2269 |
+
font-size: 24px;
|
2270 |
+
text-transform: uppercase;
|
2271 |
+
}
|
2272 |
+
|
2273 |
+
div#wple-ssl-health {
|
2274 |
+
margin: 40px 0px;
|
2275 |
+
display: -webkit-box;
|
2276 |
+
display: -ms-flexbox;
|
2277 |
+
display: flex;
|
2278 |
+
width: 99%;
|
2279 |
+
}
|
2280 |
+
|
2281 |
+
.wple-ssl-score {
|
2282 |
+
width: calc(59% - 40px);
|
2283 |
+
}
|
2284 |
+
|
2285 |
+
.wple-ssl-settings {
|
2286 |
+
width: calc(40% - 40px);
|
2287 |
+
}
|
2288 |
+
|
2289 |
+
.wple-ssl-score h2:after,
|
2290 |
+
.wple-ssl-settings h2:after {
|
2291 |
+
content: '';
|
2292 |
+
display: block;
|
2293 |
+
background: #eee;
|
2294 |
+
width: 50px;
|
2295 |
+
height: 5px;
|
2296 |
+
margin-top: 20px;
|
2297 |
+
}
|
2298 |
+
|
2299 |
+
.wple-score {
|
2300 |
+
font-size: 60px;
|
2301 |
+
line-height: 1.3em;
|
2302 |
+
font-weight: 600;
|
2303 |
+
}
|
2304 |
+
|
2305 |
+
.wple-scorebar {
|
2306 |
+
width: 100%;
|
2307 |
+
height: 20px;
|
2308 |
+
background: #eee;
|
2309 |
+
margin: 10px 0 30px;
|
2310 |
+
border-radius: 5px;
|
2311 |
+
position: relative;
|
2312 |
+
-webkit-transition: all 0.5s ease-in-out;
|
2313 |
+
transition: all 0.5s ease-in-out;
|
2314 |
+
}
|
2315 |
+
|
2316 |
+
.wple-scorebar span {
|
2317 |
+
position: absolute;
|
2318 |
+
top: 0;
|
2319 |
+
display: block;
|
2320 |
+
left: 0;
|
2321 |
+
bottom: 0;
|
2322 |
+
border-radius: 5px;
|
2323 |
+
}
|
2324 |
+
|
2325 |
+
.wple-ssl-score ul li span:not(.dashicons) {
|
2326 |
+
margin-right: 20px;
|
2327 |
+
background: #f34343;
|
2328 |
+
padding: 4px 8px;
|
2329 |
+
display: inline-block;
|
2330 |
+
width: 25px;
|
2331 |
+
text-align: center;
|
2332 |
+
text-transform: capitalize;
|
2333 |
+
border-radius: 5px;
|
2334 |
+
font-weight: 500;
|
2335 |
+
color: #fff;
|
2336 |
+
}
|
2337 |
+
|
2338 |
+
.wple-ssl-score ul li span.dashicons {
|
2339 |
+
padding: 4px;
|
2340 |
+
display: inline-block;
|
2341 |
+
width: 25px;
|
2342 |
+
}
|
2343 |
+
|
2344 |
+
.wple-ssl-score ul li {
|
2345 |
+
margin-bottom: 14px;
|
2346 |
+
}
|
2347 |
+
|
2348 |
+
.wple-ssl-score ul li span.wple-yes {
|
2349 |
+
background: #5dc55d;
|
2350 |
+
color: #fff;
|
2351 |
+
}
|
2352 |
+
|
2353 |
+
.wple-ssl-settings label {
|
2354 |
+
cursor: default;
|
2355 |
+
float: left;
|
2356 |
+
}
|
2357 |
+
|
2358 |
+
.wple-ssl-settings .plan-toggler {
|
2359 |
+
margin: 0 !important;
|
2360 |
+
}
|
2361 |
+
|
2362 |
+
.wple-ssl-settings .plan-toggler label {
|
2363 |
+
cursor: pointer !important;
|
2364 |
+
}
|
2365 |
+
|
2366 |
+
.wple-ssl-settings ul li {
|
2367 |
+
display: -webkit-inline-box;
|
2368 |
+
display: -ms-inline-flexbox;
|
2369 |
+
display: inline-flex;
|
2370 |
+
width: 100% !important;
|
2371 |
+
-webkit-box-align: center;
|
2372 |
+
-ms-flex-align: center;
|
2373 |
+
align-items: center;
|
2374 |
+
-webkit-box-pack: justify;
|
2375 |
+
-ms-flex-pack: justify;
|
2376 |
+
justify-content: space-between;
|
2377 |
+
}
|
2378 |
+
|
2379 |
+
.wple-ssl-settings .toggle-checkbox:checked + .toggle-switch {
|
2380 |
+
background: #5dc55d;
|
2381 |
+
}
|
2382 |
+
|
2383 |
+
.wple-ssl-settings ul li.wple-setting-error {
|
2384 |
+
background: #fda7a78c;
|
2385 |
+
padding: 10px;
|
2386 |
+
text-align: center;
|
2387 |
+
margin: 20px 0 20px -10px;
|
2388 |
+
color: #a71616;
|
2389 |
+
border-radius: 5px;
|
2390 |
+
display: none;
|
2391 |
+
}
|
2392 |
+
|
2393 |
+
span.wple-share-success {
|
2394 |
+
margin: 0 !important;
|
2395 |
+
}
|
2396 |
+
|
2397 |
+
span.wple-share-success a:hover {
|
2398 |
+
background: #ff8e00;
|
2399 |
+
}
|
2400 |
+
|
2401 |
+
span.wple-share-success a {
|
2402 |
+
width: 28px;
|
2403 |
+
font-size: 14px;
|
2404 |
+
text-decoration: none;
|
2405 |
+
line-height: 28px;
|
2406 |
+
display: inline-block;
|
2407 |
+
text-align: center;
|
2408 |
+
background: #999;
|
2409 |
+
color: white;
|
2410 |
+
border-radius: 50%;
|
2411 |
+
-webkit-transform: translateY(-2px);
|
2412 |
+
transform: translateY(-2px);
|
2413 |
+
-webkit-transition: all 0.5s ease;
|
2414 |
+
transition: all 0.5s ease;
|
2415 |
+
}
|
2416 |
+
|
2417 |
+
span.wple-share-success a:focus {
|
2418 |
+
outline: none;
|
2419 |
+
-webkit-box-shadow: none;
|
2420 |
+
box-shadow: none;
|
2421 |
+
}
|
2422 |
+
|
2423 |
+
span.wple-share-success a.tw:hover {
|
2424 |
+
background: #1da1f2;
|
2425 |
+
}
|
2426 |
+
|
2427 |
+
span.wple-share-success a.fb:hover {
|
2428 |
+
background: #1877f2;
|
2429 |
+
}
|
2430 |
+
|
2431 |
+
span.wple-share-success a.rd:hover {
|
2432 |
+
background: #ff4500;
|
2433 |
+
}
|
2434 |
+
|
2435 |
+
span.wple-share-success a.pt:hover {
|
2436 |
+
background: #e60023;
|
2437 |
+
}
|
2438 |
+
|
2439 |
+
table#wple-advanced-scanner th {
|
2440 |
+
background: #f5f5f591;
|
2441 |
+
padding: 10px;
|
2442 |
+
}
|
2443 |
+
|
2444 |
+
table#wple-advanced-scanner .wple-scan-head {
|
2445 |
+
background: #444;
|
2446 |
+
padding: 10px;
|
2447 |
+
color: #fff;
|
2448 |
+
}
|
2449 |
+
|
2450 |
+
table#wple-advanced-scanner tr td {
|
2451 |
+
border: 1px solid #ddd !important;
|
2452 |
+
padding: 10px;
|
2453 |
+
}
|
2454 |
+
|
2455 |
+
table#wple-advanced-scanner {
|
2456 |
+
border-collapse: collapse;
|
2457 |
+
}
|
2458 |
+
|
2459 |
+
table#wple-advanced-scanner .issue_type {
|
2460 |
+
text-align: center;
|
2461 |
+
text-transform: capitalize;
|
2462 |
+
font-weight: 500;
|
2463 |
+
}
|
2464 |
+
|
2465 |
+
table#wple-advanced-scanner th {
|
2466 |
+
border: 1px solid #ddd;
|
2467 |
+
}
|
2468 |
+
|
2469 |
+
table#wple-advanced-scanner small {
|
2470 |
+
font-size: 12px;
|
2471 |
+
font-weight: 500;
|
2472 |
+
}
|
2473 |
+
|
2474 |
+
table#wple-advanced-scanner small strong {
|
2475 |
+
font-weight: 700;
|
2476 |
+
}
|
2477 |
+
|
2478 |
+
table#wple-advanced-scanner th {
|
2479 |
+
font-size: 16px;
|
2480 |
+
font-weight: 600;
|
2481 |
+
}
|
2482 |
+
|
2483 |
+
.progress--circle {
|
2484 |
+
position: relative;
|
2485 |
+
display: inline-block;
|
2486 |
+
margin: 1rem;
|
2487 |
+
width: 300px;
|
2488 |
+
height: 300px;
|
2489 |
+
border-radius: 50%;
|
2490 |
+
background-color: #ddd;
|
2491 |
+
}
|
2492 |
+
|
2493 |
+
.progress--circle:before {
|
2494 |
+
content: '';
|
2495 |
+
position: absolute;
|
2496 |
+
top: 10px;
|
2497 |
+
left: 10px;
|
2498 |
+
width: 280px;
|
2499 |
+
height: 280px;
|
2500 |
+
border-radius: 50%;
|
2501 |
+
background-color: white;
|
2502 |
+
}
|
2503 |
+
|
2504 |
+
.progress--circle:after {
|
2505 |
+
content: '';
|
2506 |
+
display: inline-block;
|
2507 |
+
width: 100%;
|
2508 |
+
height: 100%;
|
2509 |
+
border-radius: 50%;
|
2510 |
+
background-color: #05b267;
|
2511 |
+
}
|
2512 |
+
|
2513 |
+
.progress__number {
|
2514 |
+
position: absolute;
|
2515 |
+
top: 50%;
|
2516 |
+
width: 100%;
|
2517 |
+
line-height: 1;
|
2518 |
+
text-align: center;
|
2519 |
+
color: #777;
|
2520 |
+
font-size: 2rem;
|
2521 |
+
margin-top: -1.75rem;
|
2522 |
+
}
|
2523 |
+
|
2524 |
+
.progress__number small {
|
2525 |
+
font-size: 1.25rem;
|
2526 |
+
}
|
2527 |
+
|
2528 |
+
.progress--circle.progress--0:after {
|
2529 |
+
background-image: -webkit-gradient(linear, left top, right top, color-stop(50%, #ddd), color-stop(50%, transparent), to(transparent)), -webkit-gradient(linear, left top, right top, color-stop(50%, #ea0707), color-stop(50%, #ddd), to(#ddd));
|
2530 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(90deg, #ea0707 50%, #ddd 50%, #ddd);
|
2531 |
+
background-color: #ea0707;
|
2532 |
+
}
|
2533 |
+
|
2534 |
+
.progress--circle.progress--1:after {
|
2535 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(94deg, #ea0707 50%, #ddd 50%, #ddd);
|
2536 |
+
background-color: #ea0707;
|
2537 |
+
}
|
2538 |
+
|
2539 |
+
.progress--circle.progress--2:after {
|
2540 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(98deg, #ea0707 50%, #ddd 50%, #ddd);
|
2541 |
+
background-color: #ea0707;
|
2542 |
+
}
|
2543 |
+
|
2544 |
+
.progress--circle.progress--3:after {
|
2545 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(102deg, #ea0707 50%, #ddd 50%, #ddd);
|
2546 |
+
background-color: #ea0707;
|
2547 |
+
}
|
2548 |
+
|
2549 |
+
.progress--circle.progress--4:after {
|
2550 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(106deg, #ea0707 50%, #ddd 50%, #ddd);
|
2551 |
+
background-color: #ea0707;
|
2552 |
+
}
|
2553 |
+
|
2554 |
+
.progress--circle.progress--5:after {
|
2555 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(110deg, #ea0707 50%, #ddd 50%, #ddd);
|
2556 |
+
background-color: #ea0707;
|
2557 |
+
}
|
2558 |
+
|
2559 |
+
.progress--circle.progress--6:after {
|
2560 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(114deg, #ea0707 50%, #ddd 50%, #ddd);
|
2561 |
+
background-color: #ea0707;
|
2562 |
+
}
|
2563 |
+
|
2564 |
+
.progress--circle.progress--7:after {
|
2565 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(118deg, #ea0707 50%, #ddd 50%, #ddd);
|
2566 |
+
background-color: #ea0707;
|
2567 |
+
}
|
2568 |
+
|
2569 |
+
.progress--circle.progress--8:after {
|
2570 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(122deg, #ea0707 50%, #ddd 50%, #ddd);
|
2571 |
+
background-color: #ea0707;
|
2572 |
+
}
|
2573 |
+
|
2574 |
+
.progress--circle.progress--9:after {
|
2575 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(126deg, #ea0707 50%, #ddd 50%, #ddd);
|
2576 |
+
background-color: #ea0707;
|
2577 |
+
}
|
2578 |
+
|
2579 |
+
.progress--circle.progress--10:after {
|
2580 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(130deg, #ea0707 50%, #ddd 50%, #ddd);
|
2581 |
+
background-color: #ea0707;
|
2582 |
+
}
|
2583 |
+
|
2584 |
+
.progress--circle.progress--11:after {
|
2585 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(134deg, #ea0707 50%, #ddd 50%, #ddd);
|
2586 |
+
background-color: #ea0707;
|
2587 |
+
}
|
2588 |
+
|
2589 |
+
.progress--circle.progress--12:after {
|
2590 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(138deg, #ea0707 50%, #ddd 50%, #ddd);
|
2591 |
+
background-color: #ea0707;
|
2592 |
+
}
|
2593 |
+
|
2594 |
+
.progress--circle.progress--13:after {
|
2595 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(142deg, #ea0707 50%, #ddd 50%, #ddd);
|
2596 |
+
background-color: #ea0707;
|
2597 |
+
}
|
2598 |
+
|
2599 |
+
.progress--circle.progress--14:after {
|
2600 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(146deg, #ea0707 50%, #ddd 50%, #ddd);
|
2601 |
+
background-color: #ea0707;
|
2602 |
+
}
|
2603 |
+
|
2604 |
+
.progress--circle.progress--15:after {
|
2605 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(150deg, #ea0707 50%, #ddd 50%, #ddd);
|
2606 |
+
background-color: #ea0707;
|
2607 |
+
}
|
2608 |
+
|
2609 |
+
.progress--circle.progress--16:after {
|
2610 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(154deg, #ea0707 50%, #ddd 50%, #ddd);
|
2611 |
+
background-color: #ea0707;
|
2612 |
+
}
|
2613 |
+
|
2614 |
+
.progress--circle.progress--17:after {
|
2615 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(158deg, #ea0707 50%, #ddd 50%, #ddd);
|
2616 |
+
background-color: #ea0707;
|
2617 |
+
}
|
2618 |
+
|
2619 |
+
.progress--circle.progress--18:after {
|
2620 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(162deg, #ea0707 50%, #ddd 50%, #ddd);
|
2621 |
+
background-color: #ea0707;
|
2622 |
+
}
|
2623 |
+
|
2624 |
+
.progress--circle.progress--19:after {
|
2625 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(166deg, #ea0707 50%, #ddd 50%, #ddd);
|
2626 |
+
background-color: #ea0707;
|
2627 |
+
}
|
2628 |
+
|
2629 |
+
.progress--circle.progress--20:after {
|
2630 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(170deg, #ea0707 50%, #ddd 50%, #ddd);
|
2631 |
+
background-color: #ea0707;
|
2632 |
+
}
|
2633 |
+
|
2634 |
+
.progress--circle.progress--21:after {
|
2635 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(174deg, orange 50%, #ddd 50%, #ddd);
|
2636 |
+
background-color: orange;
|
2637 |
+
}
|
2638 |
+
|
2639 |
+
.progress--circle.progress--22:after {
|
2640 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(178deg, orange 50%, #ddd 50%, #ddd);
|
2641 |
+
background-color: orange;
|
2642 |
+
}
|
2643 |
+
|
2644 |
+
.progress--circle.progress--23:after {
|
2645 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(182deg, orange 50%, #ddd 50%, #ddd);
|
2646 |
+
background-color: orange;
|
2647 |
+
}
|
2648 |
+
|
2649 |
+
.progress--circle.progress--24:after {
|
2650 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(186deg, orange 50%, #ddd 50%, #ddd);
|
2651 |
+
background-color: orange;
|
2652 |
+
}
|
2653 |
+
|
2654 |
+
.progress--circle.progress--25:after {
|
2655 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(190deg, orange 50%, #ddd 50%, #ddd);
|
2656 |
+
background-color: orange;
|
2657 |
+
}
|
2658 |
+
|
2659 |
+
.progress--circle.progress--26:after {
|
2660 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(194deg, orange 50%, #ddd 50%, #ddd);
|
2661 |
+
background-color: orange;
|
2662 |
+
}
|
2663 |
+
|
2664 |
+
.progress--circle.progress--27:after {
|
2665 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(198deg, orange 50%, #ddd 50%, #ddd);
|
2666 |
+
background-color: orange;
|
2667 |
+
}
|
2668 |
+
|
2669 |
+
.progress--circle.progress--28:after {
|
2670 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(202deg, orange 50%, #ddd 50%, #ddd);
|
2671 |
+
background-color: orange;
|
2672 |
+
}
|
2673 |
+
|
2674 |
+
.progress--circle.progress--29:after {
|
2675 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(206deg, orange 50%, #ddd 50%, #ddd);
|
2676 |
+
background-color: orange;
|
2677 |
+
}
|
2678 |
+
|
2679 |
+
.progress--circle.progress--30:after {
|
2680 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(210deg, orange 50%, #ddd 50%, #ddd);
|
2681 |
+
background-color: orange;
|
2682 |
+
}
|
2683 |
+
|
2684 |
+
.progress--circle.progress--31:after {
|
2685 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(214deg, orange 50%, #ddd 50%, #ddd);
|
2686 |
+
background-color: orange;
|
2687 |
+
}
|
2688 |
+
|
2689 |
+
.progress--circle.progress--32:after {
|
2690 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(218deg, orange 50%, #ddd 50%, #ddd);
|
2691 |
+
background-color: orange;
|
2692 |
+
}
|
2693 |
+
|
2694 |
+
.progress--circle.progress--33:after {
|
2695 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(222deg, orange 50%, #ddd 50%, #ddd);
|
2696 |
+
background-color: orange;
|
2697 |
+
}
|
2698 |
+
|
2699 |
+
.progress--circle.progress--34:after {
|
2700 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(226deg, orange 50%, #ddd 50%, #ddd);
|
2701 |
+
background-color: orange;
|
2702 |
+
}
|
2703 |
+
|
2704 |
+
.progress--circle.progress--35:after {
|
2705 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(230deg, orange 50%, #ddd 50%, #ddd);
|
2706 |
+
background-color: orange;
|
2707 |
+
}
|
2708 |
+
|
2709 |
+
.progress--circle.progress--36:after {
|
2710 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(234deg, orange 50%, #ddd 50%, #ddd);
|
2711 |
+
background-color: orange;
|
2712 |
+
}
|
2713 |
+
|
2714 |
+
.progress--circle.progress--37:after {
|
2715 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(238deg, orange 50%, #ddd 50%, #ddd);
|
2716 |
+
background-color: orange;
|
2717 |
+
}
|
2718 |
+
|
2719 |
+
.progress--circle.progress--38:after {
|
2720 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(242deg, orange 50%, #ddd 50%, #ddd);
|
2721 |
+
background-color: orange;
|
2722 |
+
}
|
2723 |
+
|
2724 |
+
.progress--circle.progress--39:after {
|
2725 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(246deg, orange 50%, #ddd 50%, #ddd);
|
2726 |
+
background-color: orange;
|
2727 |
+
}
|
2728 |
+
|
2729 |
+
.progress--circle.progress--40:after {
|
2730 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(250deg, orange 50%, #ddd 50%, #ddd);
|
2731 |
+
background-color: orange;
|
2732 |
+
}
|
2733 |
+
|
2734 |
+
.progress--circle.progress--41:after {
|
2735 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(254deg, orange 50%, #ddd 50%, #ddd);
|
2736 |
+
background-color: orange;
|
2737 |
+
}
|
2738 |
+
|
2739 |
+
.progress--circle.progress--42:after {
|
2740 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(258deg, orange 50%, #ddd 50%, #ddd);
|
2741 |
+
background-color: orange;
|
2742 |
+
}
|
2743 |
+
|
2744 |
+
.progress--circle.progress--43:after {
|
2745 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(262deg, orange 50%, #ddd 50%, #ddd);
|
2746 |
+
background-color: orange;
|
2747 |
+
}
|
2748 |
+
|
2749 |
+
.progress--circle.progress--44:after {
|
2750 |
+
background-image: linear-gradient(90deg, #ddd 50%, transparent 50%, transparent), linear-gradient(266deg, orange 50%, #ddd 50%, #ddd);
|
2751 |
+
background-color: orange;
|
2752 |
+
}
|
2753 |
+
|
2754 |
+
.progress--circle.progress--45:after {
|
2755 |
+
background-image: -webkit-gradient(linear, right top, left top, color-stop(50%, #05b267), color-stop(50%, transparent), to(transparent)), -webkit-gradient(linear, right top, left top, color-stop(50%, #05b267), color-stop(50%, #ddd), to(#ddd));
|
2756 |
+
background-image: linear-gradient(-90deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2757 |
+
}
|
2758 |
+
|
2759 |
+
.progress--circle.progress--46:after {
|
2760 |
+
background-image: linear-gradient(-86deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2761 |
+
}
|
2762 |
+
|
2763 |
+
.progress--circle.progress--47:after {
|
2764 |
+
background-image: linear-gradient(-82deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2765 |
+
}
|
2766 |
+
|
2767 |
+
.progress--circle.progress--48:after {
|
2768 |
+
background-image: linear-gradient(-78deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2769 |
+
}
|
2770 |
+
|
2771 |
+
.progress--circle.progress--49:after {
|
2772 |
+
background-image: linear-gradient(-74deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2773 |
+
}
|
2774 |
+
|
2775 |
+
.progress--circle.progress--50:after {
|
2776 |
+
background-image: linear-gradient(-70deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2777 |
+
}
|
2778 |
+
|
2779 |
+
.progress--circle.progress--51:after {
|
2780 |
+
background-image: linear-gradient(-66deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2781 |
+
}
|
2782 |
+
|
2783 |
+
.progress--circle.progress--52:after {
|
2784 |
+
background-image: linear-gradient(-62deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2785 |
+
}
|
2786 |
+
|
2787 |
+
.progress--circle.progress--53:after {
|
2788 |
+
background-image: linear-gradient(-58deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2789 |
+
}
|
2790 |
+
|
2791 |
+
.progress--circle.progress--54:after {
|
2792 |
+
background-image: linear-gradient(-54deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2793 |
+
}
|
2794 |
+
|
2795 |
+
.progress--circle.progress--55:after {
|
2796 |
+
background-image: linear-gradient(-50deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2797 |
+
}
|
2798 |
+
|
2799 |
+
.progress--circle.progress--56:after {
|
2800 |
+
background-image: linear-gradient(-46deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2801 |
+
}
|
2802 |
+
|
2803 |
+
.progress--circle.progress--57:after {
|
2804 |
+
background-image: linear-gradient(-42deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2805 |
+
}
|
2806 |
+
|
2807 |
+
.progress--circle.progress--58:after {
|
2808 |
+
background-image: linear-gradient(-38deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2809 |
+
}
|
2810 |
+
|
2811 |
+
.progress--circle.progress--59:after {
|
2812 |
+
background-image: linear-gradient(-34deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2813 |
+
}
|
2814 |
+
|
2815 |
+
.progress--circle.progress--60:after {
|
2816 |
+
background-image: linear-gradient(-30deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2817 |
+
}
|
2818 |
+
|
2819 |
+
.progress--circle.progress--61:after {
|
2820 |
+
background-image: linear-gradient(-26deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2821 |
+
}
|
2822 |
+
|
2823 |
+
.progress--circle.progress--62:after {
|
2824 |
+
background-image: linear-gradient(-22deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2825 |
+
}
|
2826 |
+
|
2827 |
+
.progress--circle.progress--63:after {
|
2828 |
+
background-image: linear-gradient(-18deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2829 |
+
}
|
2830 |
+
|
2831 |
+
.progress--circle.progress--64:after {
|
2832 |
+
background-image: linear-gradient(-14deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2833 |
+
}
|
2834 |
+
|
2835 |
+
.progress--circle.progress--65:after {
|
2836 |
+
background-image: linear-gradient(-10deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2837 |
+
}
|
2838 |
+
|
2839 |
+
.progress--circle.progress--66:after {
|
2840 |
+
background-image: linear-gradient(-6deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2841 |
+
}
|
2842 |
+
|
2843 |
+
.progress--circle.progress--67:after {
|
2844 |
+
background-image: linear-gradient(-2deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2845 |
+
}
|
2846 |
+
|
2847 |
+
.progress--circle.progress--68:after {
|
2848 |
+
background-image: linear-gradient(2deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2849 |
+
}
|
2850 |
+
|
2851 |
+
.progress--circle.progress--69:after {
|
2852 |
+
background-image: linear-gradient(6deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2853 |
+
}
|
2854 |
+
|
2855 |
+
.progress--circle.progress--70:after {
|
2856 |
+
background-image: linear-gradient(10deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2857 |
+
}
|
2858 |
+
|
2859 |
+
.progress--circle.progress--71:after {
|
2860 |
+
background-image: linear-gradient(14deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2861 |
+
}
|
2862 |
+
|
2863 |
+
.progress--circle.progress--72:after {
|
2864 |
+
background-image: linear-gradient(18deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2865 |
+
}
|
2866 |
+
|
2867 |
+
.progress--circle.progress--73:after {
|
2868 |
+
background-image: linear-gradient(22deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2869 |
+
}
|
2870 |
+
|
2871 |
+
.progress--circle.progress--74:after {
|
2872 |
+
background-image: linear-gradient(26deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2873 |
+
}
|
2874 |
+
|
2875 |
+
.progress--circle.progress--75:after {
|
2876 |
+
background-image: linear-gradient(30deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2877 |
+
}
|
2878 |
+
|
2879 |
+
.progress--circle.progress--76:after {
|
2880 |
+
background-image: linear-gradient(34deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2881 |
+
}
|
2882 |
+
|
2883 |
+
.progress--circle.progress--77:after {
|
2884 |
+
background-image: linear-gradient(38deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2885 |
+
}
|
2886 |
+
|
2887 |
+
.progress--circle.progress--78:after {
|
2888 |
+
background-image: linear-gradient(42deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2889 |
+
}
|
2890 |
+
|
2891 |
+
.progress--circle.progress--79:after {
|
2892 |
+
background-image: linear-gradient(46deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2893 |
+
}
|
2894 |
+
|
2895 |
+
.progress--circle.progress--80:after {
|
2896 |
+
background-image: linear-gradient(50deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2897 |
+
}
|
2898 |
+
|
2899 |
+
.progress--circle.progress--81:after {
|
2900 |
+
background-image: linear-gradient(54deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2901 |
+
}
|
2902 |
+
|
2903 |
+
.progress--circle.progress--82:after {
|
2904 |
+
background-image: linear-gradient(58deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2905 |
+
}
|
2906 |
+
|
2907 |
+
.progress--circle.progress--83:after {
|
2908 |
+
background-image: linear-gradient(62deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2909 |
+
}
|
2910 |
+
|
2911 |
+
.progress--circle.progress--84:after {
|
2912 |
+
background-image: linear-gradient(66deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2913 |
+
}
|
2914 |
+
|
2915 |
+
.progress--circle.progress--85:after {
|
2916 |
+
background-image: linear-gradient(70deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2917 |
+
}
|
2918 |
+
|
2919 |
+
.progress--circle.progress--86:after {
|
2920 |
+
background-image: linear-gradient(74deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2921 |
+
}
|
2922 |
+
|
2923 |
+
.progress--circle.progress--87:after {
|
2924 |
+
background-image: linear-gradient(78deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2925 |
+
}
|
2926 |
+
|
2927 |
+
.progress--circle.progress--88:after {
|
2928 |
+
background-image: linear-gradient(82deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2929 |
+
}
|
2930 |
+
|
2931 |
+
.progress--circle.progress--89:after {
|
2932 |
+
background-image: linear-gradient(86deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2933 |
+
}
|
2934 |
+
|
2935 |
+
.progress--circle.progress--90:after {
|
2936 |
+
background-image: -webkit-gradient(linear, left top, right top, color-stop(50%, #05b267), color-stop(50%, transparent), to(transparent)), -webkit-gradient(linear, right top, left top, color-stop(50%, #05b267), color-stop(50%, #ddd), to(#ddd));
|
2937 |
+
background-image: linear-gradient(90deg, #05b267 50%, transparent 50%, transparent), linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd);
|
2938 |
+
}
|
2939 |
+
|
2940 |
+
@-webkit-keyframes scanner {
|
2941 |
+
0% {
|
2942 |
+
top: 0;
|
2943 |
+
}
|
2944 |
+
100% {
|
2945 |
+
top: 99%;
|
2946 |
+
}
|
2947 |
+
}
|
2948 |
+
|
2949 |
+
@keyframes scanner {
|
2950 |
+
0% {
|
2951 |
+
top: 0;
|
2952 |
+
}
|
2953 |
+
100% {
|
2954 |
+
top: 99%;
|
2955 |
+
}
|
2956 |
+
}
|
2957 |
+
|
2958 |
+
@-webkit-keyframes infirotate {
|
2959 |
+
0% {
|
2960 |
+
-webkit-transform: rotate(0);
|
2961 |
+
transform: rotate(0);
|
2962 |
+
}
|
2963 |
+
100% {
|
2964 |
+
-webkit-transform: rotate(360deg);
|
2965 |
+
transform: rotate(360deg);
|
2966 |
+
}
|
2967 |
+
}
|
2968 |
+
|
2969 |
+
@keyframes infirotate {
|
2970 |
+
0% {
|
2971 |
+
-webkit-transform: rotate(0);
|
2972 |
+
transform: rotate(0);
|
2973 |
+
}
|
2974 |
+
100% {
|
2975 |
+
-webkit-transform: rotate(360deg);
|
2976 |
+
transform: rotate(360deg);
|
2977 |
+
}
|
2978 |
+
}
|
2979 |
+
|
2980 |
+
@media (max-width: 1200px) {
|
2981 |
+
ul.wple-progress {
|
2982 |
+
width: 100%;
|
2983 |
+
-ms-flex-wrap: wrap;
|
2984 |
+
flex-wrap: wrap;
|
2985 |
+
}
|
2986 |
+
ul.wple-progress li {
|
2987 |
+
font-size: 14px;
|
2988 |
+
font-weight: 400;
|
2989 |
+
}
|
2990 |
+
.wple-success-flex {
|
2991 |
+
-ms-flex-wrap: wrap;
|
2992 |
+
flex-wrap: wrap;
|
2993 |
+
}
|
2994 |
+
.wple-success-flex-final {
|
2995 |
+
padding: 15px 20px 0 20px;
|
2996 |
+
margin-left: 0;
|
2997 |
+
}
|
2998 |
+
.wple-success-flex-video {
|
2999 |
+
margin-bottom: 20px;
|
3000 |
+
}
|
3001 |
+
.wple-success-cols {
|
3002 |
+
-ms-flex-wrap: wrap;
|
3003 |
+
flex-wrap: wrap;
|
3004 |
+
}
|
3005 |
+
.wple-success-cols div {
|
3006 |
+
width: 44%;
|
3007 |
+
margin: 10px 0;
|
3008 |
+
}
|
3009 |
+
}
|
3010 |
+
|
3011 |
+
@media (max-width: 1024px) {
|
3012 |
+
.wple-plan-compare {
|
3013 |
+
-ms-flex-wrap: wrap;
|
3014 |
+
flex-wrap: wrap;
|
3015 |
+
}
|
3016 |
+
.wple-compare-item {
|
3017 |
+
width: 23%;
|
3018 |
+
}
|
3019 |
+
.wple-upgrade-pro {
|
3020 |
+
-ms-flex-wrap: wrap;
|
3021 |
+
flex-wrap: wrap;
|
3022 |
+
}
|
3023 |
+
}
|
3024 |
+
|
3025 |
+
@media (max-width: 991px) {
|
3026 |
+
#le-tabbed-sections {
|
3027 |
+
width: 100%;
|
3028 |
+
}
|
3029 |
+
div#le-tabs-container {
|
3030 |
+
-webkit-box-orient: vertical;
|
3031 |
+
-webkit-box-direction: normal;
|
3032 |
+
-ms-flex-direction: column;
|
3033 |
+
flex-direction: column;
|
3034 |
+
}
|
3035 |
+
.le-other-plugins {
|
3036 |
+
padding: 20px 0;
|
3037 |
+
}
|
3038 |
+
div#wple-ssl-health {
|
3039 |
+
-webkit-box-orient: vertical;
|
3040 |
+
-webkit-box-direction: normal;
|
3041 |
+
-ms-flex-direction: column;
|
3042 |
+
flex-direction: column;
|
3043 |
+
}
|
3044 |
+
div#wple-ssl-health > div {
|
3045 |
+
width: 88%;
|
3046 |
+
}
|
3047 |
+
}
|
3048 |
+
|
3049 |
+
@media (max-width: 767px) {
|
3050 |
+
.toplevel_page_wp_encryption #wpcontent {
|
3051 |
+
background-size: auto;
|
3052 |
+
}
|
3053 |
+
.wple-compare-item {
|
3054 |
+
width: 34%;
|
3055 |
+
margin: 10px 8%;
|
3056 |
+
}
|
3057 |
+
div#wple-upgradepro {
|
3058 |
+
min-height: auto;
|
3059 |
+
}
|
3060 |
+
.wple-other-plugins {
|
3061 |
+
display: none;
|
3062 |
+
}
|
3063 |
+
.wple-other-content {
|
3064 |
+
width: 100%;
|
3065 |
+
}
|
3066 |
+
}
|
3067 |
+
|
3068 |
+
/** intro pricing **/
|
3069 |
+
h4.pricing-intro-subhead .dashicons {
|
3070 |
+
height: 25px;
|
3071 |
+
}
|
3072 |
+
|
3073 |
+
div#quick-pricing-table {
|
3074 |
+
display: -webkit-box;
|
3075 |
+
display: -ms-flexbox;
|
3076 |
+
display: flex;
|
3077 |
+
-webkit-box-pack: center;
|
3078 |
+
-ms-flex-pack: center;
|
3079 |
+
justify-content: center;
|
3080 |
+
text-align: center;
|
3081 |
+
margin: 100px 20px 60px 20px;
|
3082 |
+
}
|
3083 |
+
|
3084 |
+
div#quick-pricing-table .wplepricingcol {
|
3085 |
+
width: 330px;
|
3086 |
+
display: -webkit-inline-box;
|
3087 |
+
display: -ms-inline-flexbox;
|
3088 |
+
display: inline-flex;
|
3089 |
+
-webkit-box-orient: vertical;
|
3090 |
+
-webkit-box-direction: normal;
|
3091 |
+
-ms-flex-direction: column;
|
3092 |
+
flex-direction: column;
|
3093 |
+
-webkit-box-align: center;
|
3094 |
+
-ms-flex-align: center;
|
3095 |
+
align-items: center;
|
3096 |
+
-webkit-box-pack: justify;
|
3097 |
+
-ms-flex-pack: justify;
|
3098 |
+
justify-content: space-between;
|
3099 |
+
}
|
3100 |
+
|
3101 |
+
.pro-pricing-col.wplepricingcol {
|
3102 |
+
border: 1px solid #ddd;
|
3103 |
+
-webkit-transform: scale(1.1);
|
3104 |
+
transform: scale(1.1);
|
3105 |
+
border-radius: 5px;
|
3106 |
+
background: #fff;
|
3107 |
+
}
|
3108 |
+
|
3109 |
+
.wplepricingcol ul li {
|
3110 |
+
list-style: none;
|
3111 |
+
font-size: 18px;
|
3112 |
+
line-height: 20px;
|
3113 |
+
min-height: 20px;
|
3114 |
+
padding: 22px 10px;
|
3115 |
+
border-bottom: 1px solid #ddd;
|
3116 |
+
margin: 0;
|
3117 |
+
}
|
3118 |
+
|
3119 |
+
.free-pricing-col.wplepricingcol {
|
3120 |
+
margin-right: 1%;
|
3121 |
+
border: 1px solid #ddd;
|
3122 |
+
border-radius: 5px 0 0;
|
3123 |
+
}
|
3124 |
+
|
3125 |
+
.quick-pricing-head h3 {
|
3126 |
+
font-size: 32px;
|
3127 |
+
margin: 0;
|
3128 |
+
font-weight: 300;
|
3129 |
+
min-height: 50px;
|
3130 |
+
}
|
3131 |
+
|
3132 |
+
.quick-pricing-head large {
|
3133 |
+
font-size: 40px;
|
3134 |
+
}
|
3135 |
+
|
3136 |
+
.quick-pricing-head {
|
3137 |
+
padding: 40px 0px;
|
3138 |
+
background: #fafafa;
|
3139 |
+
min-height: 80px;
|
3140 |
+
width: 100%;
|
3141 |
+
}
|
3142 |
+
|
3143 |
+
div#quick-pricing-table ul {
|
3144 |
+
margin: 0;
|
3145 |
+
}
|
3146 |
+
|
3147 |
+
div#quick-pricing-table .pricing-btn-block {
|
3148 |
+
height: 40px;
|
3149 |
+
margin-top: 30px;
|
3150 |
+
margin-bottom: 10px;
|
3151 |
+
}
|
3152 |
+
|
3153 |
+
div#quick-pricing-table .pricing-btn-block a {
|
3154 |
+
background: #222;
|
3155 |
+
text-decoration: none;
|
3156 |
+
color: #fff;
|
3157 |
+
text-transform: uppercase;
|
3158 |
+
font-size: 15px;
|
3159 |
+
padding: 5px 18px 7px;
|
3160 |
+
/* display: inline-block; */
|
3161 |
+
border-radius: 5px;
|
3162 |
+
/* margin: 15px 5px; */
|
3163 |
+
}
|
3164 |
+
|
3165 |
+
.wplepricingcol ul li:last-child {
|
3166 |
+
border: none;
|
3167 |
+
}
|
3168 |
+
|
3169 |
+
.pro-pricing-col li {
|
3170 |
+
font-size: 16px !important;
|
3171 |
+
}
|
3172 |
+
|
3173 |
+
.pro-pricing-col li a {
|
3174 |
+
color: #097fb7;
|
3175 |
+
text-decoration: none;
|
3176 |
+
border-bottom: 1px dotted #0073aa;
|
3177 |
+
}
|
3178 |
+
|
3179 |
+
.wplepricingcol ul li {
|
3180 |
+
text-transform: capitalize;
|
3181 |
+
}
|
3182 |
+
|
3183 |
+
.pro-pricing-col li a:focus {
|
3184 |
+
outline: none !important;
|
3185 |
+
-webkit-box-shadow: none !important;
|
3186 |
+
box-shadow: none !important;
|
3187 |
+
}
|
3188 |
+
|
3189 |
+
div#quick-pricing-table .pricing-btn-block a:hover {
|
3190 |
+
background: #333 !important;
|
3191 |
+
}
|
3192 |
+
|
3193 |
+
.pro-pricing-col.wplepricingcol .pricing-btn-block a {
|
3194 |
+
background: #1093d1 !important;
|
3195 |
+
}
|
3196 |
+
|
3197 |
+
.quick-price-row small {
|
3198 |
+
font-size: 18px;
|
3199 |
+
}
|
3200 |
+
|
3201 |
+
.quick-price-row sup {
|
3202 |
+
font-size: 20px;
|
3203 |
+
font-weight: 500;
|
3204 |
+
}
|
3205 |
+
|
3206 |
+
h4.pricing-intro-subhead {
|
3207 |
+
font-size: 18px;
|
3208 |
+
font-weight: 400;
|
3209 |
+
margin-top: 10px;
|
3210 |
+
text-align: center;
|
3211 |
+
color: #666;
|
3212 |
+
line-height: 1.4em;
|
3213 |
+
}
|
3214 |
+
|
3215 |
+
h2.pricing-intro-head {
|
3216 |
+
margin-bottom: 0px !important;
|
3217 |
+
}
|
3218 |
+
|
3219 |
+
.non-cpanel-plans .pro-pricing-col ul li {
|
3220 |
+
padding: 17px 10px;
|
3221 |
+
}
|
3222 |
+
|
3223 |
+
.free-pricing-col {
|
3224 |
+
-webkit-box-pack: start !important;
|
3225 |
+
-ms-flex-pack: start !important;
|
3226 |
+
justify-content: flex-start !important;
|
3227 |
+
}
|
3228 |
+
|
3229 |
+
.quick-pricing-head {
|
3230 |
+
border-radius: 5px 5px 0 0;
|
3231 |
+
}
|
3232 |
+
|
3233 |
+
.quick-pricing-head.pro {
|
3234 |
+
min-height: 100px;
|
3235 |
+
}
|
3236 |
+
|
3237 |
+
.wplepricingcol.firewallplan .quick-pricing-head {
|
3238 |
+
min-height: 100px;
|
3239 |
+
}
|
3240 |
+
|
3241 |
+
.inro-pricing-refund {
|
3242 |
+
clear: both;
|
3243 |
+
display: block;
|
3244 |
+
text-align: right;
|
3245 |
+
}
|
3246 |
+
|
3247 |
+
.quick-pricing-head {
|
3248 |
+
position: relative;
|
3249 |
+
overflow: hidden;
|
3250 |
+
}
|
3251 |
+
|
3252 |
+
span.wple-trending {
|
3253 |
+
position: absolute;
|
3254 |
+
top: 16px;
|
3255 |
+
right: -40px;
|
3256 |
+
-webkit-transform: rotate(45deg);
|
3257 |
+
transform: rotate(45deg);
|
3258 |
+
background: #0990d1;
|
3259 |
+
color: #fff;
|
3260 |
+
padding: 5px 45px;
|
3261 |
+
-webkit-box-shadow: 0px 0px 5px #8c9497;
|
3262 |
+
box-shadow: 0px 0px 5px #8c9497;
|
3263 |
+
}
|
3264 |
+
|
3265 |
+
.subdir-http-challenge.manualchallenge {
|
3266 |
+
position: relative;
|
3267 |
+
}
|
3268 |
+
|
3269 |
+
.wple-no-http {
|
3270 |
+
position: absolute;
|
3271 |
+
background: rgba(255, 255, 255, 0.9);
|
3272 |
+
top: 0;
|
3273 |
+
left: 0;
|
3274 |
+
bottom: 0;
|
3275 |
+
right: 0;
|
3276 |
+
display: -webkit-inline-box;
|
3277 |
+
display: -ms-inline-flexbox;
|
3278 |
+
display: inline-flex;
|
3279 |
+
-webkit-box-align: center;
|
3280 |
+
-ms-flex-align: center;
|
3281 |
+
align-items: center;
|
3282 |
+
padding: 30px;
|
3283 |
+
text-align: center;
|
3284 |
+
border-radius: 10px;
|
3285 |
+
font-weight: 500;
|
3286 |
+
font-size: 21px;
|
3287 |
+
color: #777;
|
3288 |
+
line-height: 1.5em;
|
3289 |
+
}
|
3290 |
+
|
3291 |
+
.wple-error-firewall.fire-pro .wple-upgrade-features span {
|
3292 |
+
width: 23%;
|
3293 |
+
}
|
3294 |
+
|
3295 |
+
.wple-upgrade-features span strong {
|
3296 |
+
color: #555;
|
3297 |
+
}
|
3298 |
+
|
3299 |
+
.wple-upgrade-features span a:hover {
|
3300 |
+
background: none;
|
3301 |
+
}
|
3302 |
+
|
3303 |
+
.wple-upgrade-features span a {
|
3304 |
+
text-decoration: none;
|
3305 |
+
border-bottom: 1px dotted;
|
3306 |
+
}
|
3307 |
+
|
3308 |
+
.wple-error-firewall.fire-pro .wple-upgrade-features {
|
3309 |
+
margin-top: -10px;
|
3310 |
+
margin-bottom: -10px;
|
3311 |
+
margin-right: 0;
|
3312 |
+
}
|
3313 |
+
|
3314 |
+
.toggle {
|
3315 |
+
cursor: pointer;
|
3316 |
+
display: inline-block;
|
3317 |
+
}
|
3318 |
+
|
3319 |
+
.toggle-switch {
|
3320 |
+
display: inline-block;
|
3321 |
+
background: #ccc;
|
3322 |
+
border-radius: 16px;
|
3323 |
+
width: 58px;
|
3324 |
+
height: 32px;
|
3325 |
+
position: relative;
|
3326 |
+
vertical-align: middle;
|
3327 |
+
-webkit-transition: background 0.25s;
|
3328 |
+
transition: background 0.25s;
|
3329 |
+
}
|
3330 |
+
|
3331 |
+
.toggle-switch:before,
|
3332 |
+
.toggle-switch:after {
|
3333 |
+
content: "";
|
3334 |
+
}
|
3335 |
+
|
3336 |
+
.toggle-switch:before {
|
3337 |
+
display: block;
|
3338 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee));
|
3339 |
+
background: linear-gradient(to bottom, #fff 0%, #eee 100%);
|
3340 |
+
border-radius: 50%;
|
3341 |
+
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
|
3342 |
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
|
3343 |
+
width: 24px;
|
3344 |
+
height: 24px;
|
3345 |
+
position: absolute;
|
3346 |
+
top: 4px;
|
3347 |
+
left: 4px;
|
3348 |
+
-webkit-transition: left 0.25s;
|
3349 |
+
transition: left 0.25s;
|
3350 |
+
}
|
3351 |
+
|
3352 |
+
.toggle:hover .toggle-switch:before {
|
3353 |
+
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#fff));
|
3354 |
+
background: linear-gradient(to bottom, #fff 0%, #fff 100%);
|
3355 |
+
-webkit-box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
|
3356 |
+
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
|
3357 |
+
}
|
3358 |
+
|
3359 |
+
.toggle-checkbox:checked + .toggle-switch {
|
3360 |
+
background: #0073aa;
|
3361 |
+
}
|
3362 |
+
|
3363 |
+
.toggle-checkbox:checked + .toggle-switch:before {
|
3364 |
+
left: 30px;
|
3365 |
+
}
|
3366 |
+
|
3367 |
+
.toggle-checkbox {
|
3368 |
+
position: absolute;
|
3369 |
+
visibility: hidden;
|
3370 |
+
}
|
3371 |
+
|
3372 |
+
.toggle-label {
|
3373 |
+
margin-left: 5px;
|
3374 |
+
position: relative;
|
3375 |
+
top: 2px;
|
3376 |
+
font-size: 17px;
|
3377 |
+
color: #666;
|
3378 |
+
}
|
3379 |
+
|
3380 |
+
.plan-toggler {
|
3381 |
+
text-align: center;
|
3382 |
+
margin: 0 0 20px -40px;
|
3383 |
+
}
|
3384 |
+
|
3385 |
+
.plan-toggler > span {
|
3386 |
+
margin-right: 10px;
|
3387 |
+
font-size: 18px;
|
3388 |
+
color: #666;
|
3389 |
+
}
|
3390 |
+
|
3391 |
+
.wildcard-genform {
|
3392 |
+
display: none;
|
3393 |
+
}
|
3394 |
+
|
3395 |
+
.wple-wc {
|
3396 |
+
display: none;
|
3397 |
+
}
|
3398 |
+
|
3399 |
+
.wple-wc.active {
|
3400 |
+
display: block;
|
3401 |
+
}
|
3402 |
+
|
3403 |
+
.wple-restart-notice {
|
3404 |
+
margin: 0 60px;
|
3405 |
+
font-size: 18px;
|
3406 |
+
line-height: 1.5em;
|
3407 |
+
background: #fffbc7;
|
3408 |
+
padding: 20px;
|
3409 |
+
border-radius: 7px;
|
3410 |
+
color: #555;
|
3411 |
+
}
|
3412 |
+
|
3413 |
+
.wple-restart-notice a {
|
3414 |
+
text-decoration: none;
|
3415 |
+
}
|
3416 |
+
/*# sourceMappingURL=le-admin.css.map */
|
admin/css/le-admin.css.map
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"version": 3,
|
3 |
+
"mappings": "AAAA,AAAA,WAAW,CAAC,MAAM,C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-admin.css"
|
9 |
+
}
|
admin/css/le-admin.min.css
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
.le-genform button{background:#2585d3;color:#fff;border:none;padding:15px;cursor:pointer;-webkit-box-shadow:0px 0px 5px #aaa;box-shadow:0px 0px 5px #aaa;margin-top:40px;margin-bottom:40px;outline:none;border-radius:3px;letter-spacing:0.5px}.le-genform button:hover{background:#0063c7}div#le-wrap{clear:both;-webkit-box-shadow:none;box-shadow:none}a.gws-logo{float:right}.le-inner{display:inline-block;padding:0;width:100%}#le-wrap h2{font-size:26px;margin-top:0}.le-debugger{background:#f5f5f5;border:1px solid #aaa;padding:10px;color:#666;border-radius:5px;margin-bottom:30px;max-height:500px;overflow-y:scroll;text-align:left}form.le-genform{text-align:center;font-size:18px}form.le-genform input[type="email"],.le-genform input[type="text"],.le-genform input[type="password"]{font-size:20px;width:600px;line-height:50px;text-indent:10px;margin-bottom:20px;max-width:100%;border:1px solid #ddd}.le-powered{background:#f0f0f0;color:#666;padding:10px;border-radius:5px;margin-top:20px}a.le-highlight{background:#0073aa;color:#fff;padding:3px 6px;text-decoration:none}p.le-lineheight{line-height:30px}a.gws-logo img{max-width:150px}span.lecheck{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-bottom:15px;width:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.le-powered a{color:#444;font-weight:600}.le-debugger .error{color:red}.wple-force{padding:5px 20px 20px;border-radius:5px}.wple-force p,.wple-force label{font-size:15px}.wple-force button{margin:30px 0 0;background:#0073aa;color:#fff;border:none;padding:10px 20px;font-size:16px;cursor:pointer;line-height:20px;display:block}.le-buypro{background:rgba(0,115,170,0.08);border:2px dashed #0073aa;text-align:center;padding:20px 20px 30px;margin-bottom:20px}.le-buypro p{color:#00405f;font-size:18px;margin:0 0 20px}.le-buypro a,.newbie a{background:#0073aa;color:#fff;font-size:18px;text-decoration:none;padding:17px 20px;font-weight:500;cursor:pointer;display:inline-block}.newbie a{margin:20px auto !important;padding:15px 40px}.le-buypro a:hover{background:#06628e}p.le-offer{font-weight:600;font-style:italic}.wplerateus span{color:#ff8d00;font-size:24px;margin:0 2px}.wplerateus p{font-size:14px !important}.wplerateus a{font-weight:600;text-decoration:none}li.le-expirydate b{color:#f96868;font-weight:bold;letter-spacing:1px}.le-debugger.running{position:relative;padding-top:50px}.le-debugger.running h3{position:absolute;left:0;top:0;right:0;margin:0;background:#a4a4a4;color:#fff;padding:8px;font-size:15px}.le-debugger.running h3 a{color:#fff}.le-section{padding:20px;background:#f9f9f9;border:1px solid #ddd;display:none;border-radius:0}.le-section-title{padding:15px 30px;display:inline-block;background:#eee;border-radius:7px 30px 0 0;margin:0 5px 0 0;color:#666;font-weight:500;cursor:pointer}.le-section-title.active,.le-section-title:hover{background:#0073aa;color:#fff}.le-section.active{display:block}.le-section.download-certs ul{margin:0}.le-section h3{margin-top:0;line-height:1.4em}.le-section-title[data-section=go-viral]{background:#ccc;color:#444}.wple-dismiss{color:#bbb !important;float:right;cursor:pointer;font-size:21px !important}.wple-dismiss:hover{color:#999 !important}.le-debugger.running h2{margin:20px !important;display:block;line-height:1.3em;text-align:center;color:#006300}.hideheader h2{display:none !important}a.wplecompare{background:none !important;color:#075e88;padding:5px;text-transform:uppercase;border-bottom:1px dashed #075e88;font-weight:600;border-top:1px dashed #075e88}a.wplecompare span{font-size:23px}.running .wple-promo{font-size:15px;padding:8px;text-align:center;border:1px dashed #006b00}.running a{font-weight:bold;color:#006b00}.running b{font-weight:bold}.wple-success-form{background:#fff;padding:20px;margin:30px 0;text-align:center;border-radius:10px;-webkit-box-shadow:0px 0px 10px green;box-shadow:0px 0px 10px green}.wple-success-form h2{color:#0b9e0b;line-height:50px;font-weight:400;font-size:24px !important}.wple-success-form button{background:#149a14;border:none;color:#fff;font-size:24px;padding:10px 20px;border-radius:5px;cursor:pointer}.wple-success-form button:hover{background:darkgreen}.wple-warning-notice{padding:20px;line-height:40px;text-align:center;background:#fff;margin:40px 20px;border-radius:10px;border:2px dashed #098001}.wple-warning-notice h2{color:#0aa524;margin:0;font-size:26px !important;font-weight:500}.toplevel_page_wp_encryption #wpcontent,.admin_page_wp_encryption_faq #wpcontent,.admin_page_wp_encryption_howto_videos #wpcontent,.wp-encryption_page_wp_encryption_godaddy #wpcontent,.admin_page_wp_encryption_log #wpcontent,[class*="wp-encryption_page"] #wpcontent{background:#f5f5f5 url(../assets/bg.png) no-repeat top right;background-size:100% auto;min-height:600px}.wple-header{margin:30px 20px 30px 0;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}#wple-upgradepro,#wple-sslgenerator,#wple-sslgen{width:1500px;max-width:calc(100% - 60px);margin:0 auto 30px;background:#fff;border-radius:10px;padding:20px;min-height:400px;-webkit-box-shadow:0px 0px 30px #ddd;box-shadow:0px 0px 30px #ddd}.wple-compare-item{width:14.6%;margin:20px 1%;text-align:center}.wple-plan-compare{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap;margin-bottom:20px}.wple-plans span{display:block;font-weight:600;font-size:14px;margin:0 5px 3px;letter-spacing:1px;color:#888}.wple-plans .pro{color:#2585d3}.wple-header .wple-version{color:#aaa;margin:0 10px;font-size:16px;line-height:70px}.wple-header img{float:left}.wple-compare-item h4{font-size:15px;margin-top:0;margin-bottom:10px;line-height:22px}.wple-compare-item span{display:block;font-size:14px;padding:1px;color:#2585d3;font-weight:400;letter-spacing:1px}.wple-compare-item .wple-free{color:#888}.wple-compare-item img{max-width:100%;width:130px}.wple-upgrade-pro a{background:#2585d3;font-size:20px;text-decoration:none;color:#fff;padding:17px 25px;display:inline-block;text-transform:uppercase;border-radius:5px;cursor:pointer;letter-spacing:1px;font-weight:600;margin:5px 8px;-webkit-box-shadow:none;box-shadow:none}.wple-upgrade-pro a:not(.wplecompare) .dashicons{color:#fff !important;margin-left:5px}.wple-upgrade-pro .wplecompare{-webkit-box-shadow:none;box-shadow:none;color:#6087b8;border-radius:0;padding:8px 5px;margin:0 10px;font-size:14px;line-height:24px;border-color:#ddd}.wple-upgrade-pro{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.wp-encryption_page_wp_encryption-pricing #wpcontent{background:none !important}#wple-sslgenerator{min-height:auto;background:none !important;-webkit-box-shadow:none;box-shadow:none}#wple-sslgenerator .wple-success-form{margin:0}#wple-sslgenerator .wple-success-form h2{margin-top:0;display:inline-block;margin-bottom:0px}#wple-sslgenerator .wple-success-form h3{font-size:18px;line-height:1.5em;margin-bottom:40px;color:#027302}#wple-sslgenerator .wple-success-form button{background:none;border:2px solid green;color:green;font-weight:500;margin-top:20px;margin-bottom:20px}#wple-sslgenerator .wple-success-form ul:not(.wple-progress) li{font-size:18px;margin-bottom:10px;color:green}#wple-sslgenerator .wple-success-form span.dashicons{color:#039154;font-size:50px;width:43px;float:left}div#wple-sslgen,#le-wrap{-webkit-box-shadow:0px 0px 10px #ddd;box-shadow:0px 0px 10px #ddd}div#wple-sslgen h2{margin:20px 0 40px;font-size:28px;text-align:center;text-transform:uppercase;font-weight:bold;color:#555;line-height:1.5em}div#wple-sslgen{min-height:auto}span.dashicons.dashicons-editor-help.wple-tooltip{font-size:28px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;color:#aaa;cursor:help}.toggle-debugger{text-align:right;margin-top:-10px;margin-bottom:10px;color:green;font-weight:500;cursor:pointer}.toggle-debugger .rotate{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.checkbox-label{display:block;position:relative;margin:auto;cursor:pointer;font-size:22px;line-height:24px;height:24px;width:24px;clear:both;margin-right:10px;margin-bottom:-2px}.checkbox-label input{position:absolute;opacity:0;cursor:pointer}.checkbox-label .checkbox-custom{position:absolute;top:0px;left:0px;height:24px;width:24px;background-color:#fff;border-radius:5px;transition:all 0.3s ease-out;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-ms-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out;border:1px solid #dddddd}.checkbox-label input:checked ~ .checkbox-custom{background-color:#FFFFFF;border-radius:5px;-webkit-transform:rotate(0deg) scale(1);transform:rotate(0deg) scale(1);opacity:1;border:1px solid #dddddd}.checkbox-label .checkbox-custom::after{position:absolute;content:"";left:12px;top:12px;height:0px;width:0px;border-radius:5px;border:solid #009BFF;border-width:0 3px 3px 0;-webkit-transform:rotate(0deg) scale(0);transform:rotate(0deg) scale(0);opacity:1;transition:all 0.3s ease-out;-webkit-transition:all 0.3s ease-out;-moz-transition:all 0.3s ease-out;-ms-transition:all 0.3s ease-out;-o-transition:all 0.3s ease-out}.checkbox-label input:checked ~ .checkbox-custom::after{-webkit-transform:rotate(45deg) scale(1);transform:rotate(45deg) scale(1);opacity:1;left:8px;top:3px;width:6px;height:12px;border:solid #009BFF;border-width:0 2px 2px 0;background-color:transparent;border-radius:0}span.lecheck label{margin:3px 10px}span.lecheck b,span.lecheck a{margin:0 5px}#wple-sslgenerator.error{background:#fff !important;color:#f14242;font-size:15px;border-right:4px solid #e80404;border-left:4px solid #e80404}.wple-gdaddy p{max-width:800px;margin:0 auto 40px;text-align:center;font-size:16px}.wple-gdaddy label{margin-right:10px;font-weight:600}.wple-gdaddy{text-align:center}.le-other-plugins{padding:10px 0 0;text-align:center}.le-other-plugins a{display:inline-block;outline:none;-webkit-box-shadow:none;box-shadow:none}.le-other-plugins img{max-width:100%}ul.wple-progress{display:-webkit-box;display:-ms-flexbox;display:flex;margin:30px auto;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:90%;position:relative}ul.wple-progress li{list-style:none;font-size:18px;color:#aaa;font-weight:500;padding:10px 15px;background:#fff;position:relative}ul.wple-progress li.prog-1{color:#0b9e0b}ul.wple-progress li.prog-0{color:#da0404}ul.wple-progress:before{content:'';height:1px;width:100%;position:absolute;background:#ddd;top:46%}ul.wple-progress li span{border:2px solid;width:20px;border-radius:50%;display:inline-block;height:20px;text-align:center;padding:2px;font-size:14px;line-height:20px}.wple-multisite{text-align:center;font-size:20px;margin-bottom:40px;margin-top:-30px}input.wple-domain-input{text-transform:uppercase;color:#888;background:#dadada;letter-spacing:1px}.wple-review-box{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:10px}.wple-review-box p{font-size:16px;margin-top:0;padding:2px 0}.wple-review-box strong{font-size:17px;margin:7px 0 5px;display:block}.wple-review-box img{border-radius:50%}.wple-review-box img{float:left;width:60px;height:60px;margin-right:10px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.wple-admin-review{padding:10px 15px 15px}a.wplerevbtn{background:#eee;text-decoration:none;padding:7px 13px;margin-right:7px;border-radius:3px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}a.wple-lets-review.wplerevbtn{background:#0073aa;color:#fff}a.wple-reset-button{background:#c70505;text-decoration:none;padding:10px 20px;margin:20px 0;display:inline-block;color:#fff;outline:none;-webkit-box-shadow:none;box-shadow:none}form#admin-verify-dns button{margin-top:10px;background:#068f63;border:none;color:#fff;padding:10px 20px;cursor:pointer}.buttonrotate .dashicons{-webkit-animation:infirotate 1s linear infinite forwards;animation:infirotate 1s linear infinite forwards;-webkit-transform-origin:center;transform-origin:center;margin-right:5px}form#admin-verify-dns button:disabled{background:#666;color:#ccc}.dns-notvalid{color:#f14242;display:none}.dns-notvalid.active{display:block}.wple-newdns{margin:20px 0;background:#f5f5f5;padding:0 20px 20px;border-left:2px solid}.wple-success-cols{display:-webkit-box;display:-ms-flexbox;display:flex;margin:20px 0}.wple-success-cols div{text-align:left;padding:20px;border-right:1px solid #eee;width:25%}.wple-success-cols h3{margin-bottom:10px !important;position:relative;padding-bottom:12px;color:#039103 !important}.wple-success-cols div:last-child{border:none}.wple-success-cols p{font-size:17px;color:#7d7d7d}.wple-success-cols h3:before{content:'';width:50px;height:2px;background:#eee;position:absolute;bottom:0}.wple-review-box.wple-reminder-notice{color:#e03838}.wple-review-box.wple-reminder-notice p strong{display:inline-block;margin:0}.subdir-challenges-block{display:-webkit-box;display:-ms-flexbox;display:flex;text-align:left}.manualchallenge{width:48%;margin:20px 1%;background:#fafafa;padding:20px;border:1px solid #ddd;border-radius:10px;font-size:15px}.manualchallenge h3{margin:-10px 0 10px -20px !important;font-size:16px !important;padding:3px 10px;background:#888;display:inline-block;color:#fff !important;border-radius:0 5px 5px 0}.subdir-http-challenge.manualchallenge a:not(.videolink){text-decoration:none;color:green;font-size:16px;display:block;background:#fff;padding:5px;line-height:30px}.wple-http-manual-verify a{padding:5px 5px 0 !important;font-weight:500}.subdir-http-challenge.manualchallenge span:not(.dashicons-video-alt){font-size:26px !important;width:30px !important;margin:4px 0 0 5px}.subdns-item{background:#fff;padding:7px 15px;margin-bottom:10px;line-height:1.5em}.manualchallenge button{border:none !important;padding:0px 13px !important;font-size:15px;background:#1e9654 !important;color:#fff !important;font-weight:normal !important;line-height:35px;outline:none;margin:10px 0 !important}.manualchallenge button span,.subdir-http-challenge.manualchallenge button span{color:#fff !important;font-size:24px !important;margin:5px 0 !important;width:auto !important;height:24px !important}.manualchallenge button:disabled{background:#aaa !important}.manualchallenge button span{-webkit-transform-origin:center !important;transform-origin:center !important}.http-notvalid{color:#f14242;display:none}.http-notvalid.active{display:block}#wple-error-popper{position:fixed;display:none;top:0;left:0;right:0;bottom:0;background:rgba(59,59,59,0.5)}.wple-flex{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;height:100%}div#wple-error-popper .wple-error{display:inline-block;background:#fff;font-size:21px;color:#ff0909;padding:20px 40px;border-radius:5px;-webkit-box-shadow:0px 0px 10px #aaa;box-shadow:0px 0px 10px #aaa;text-transform:uppercase}.wple-flex img{margin-left:150px;display:none;-webkit-animation:infirotate 1s linear infinite forwards;animation:infirotate 1s linear infinite forwards}div#firewall-steps{margin:40px 60px;font-size:16px}div#firewall-steps h3{color:#444;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:22px;margin:22px 0;line-height:30px}div#firewall-steps h3 span{font-size:24px;margin-left:7px}div#firewall-steps .fa-check-circle{color:#07a007}div#firewall-steps .fa-times-circle{color:#d11313}div#firewall-steps .fa-circle-notch{color:#666}div#firewall-dns,#firewall-wpconfig,.rootssh-check{background:#fafafa;padding:20px;border:1px solid #ddd;border-radius:8px;font-size:18px;line-height:1.5em;display:none}div#firewall-dns p,#firewall-wpconfig p{margin-top:0;font-size:20px}div#firewall-wpconfig blockquote{font-size:17px;font-weight:500;margin:40px 10px 10px !important;background:#eee;padding:20px;border-radius:10px}div#firewall-wpconfig{margin-bottom:20px}div#firewall-dns ul li{list-style:disc;padding:5px 0}div#firewall-dns ul{margin:0 20px 20px 40px}div#firewall-dns ul li span{font-weight:bold}div#firewall-dns b{color:#222}div#firewall-steps button,.firewall-btn{background:#0282bf;color:#fff;font-size:16px;border:none;padding:5px 20px;border-radius:5px;line-height:35px;text-transform:uppercase;cursor:pointer;letter-spacing:0.5px;font-weight:400}p.spmode-status{display:inline-block;margin:10px;color:#777}button#start-firewall{font-size:18px !important;margin-top:10px;padding:8px 30px !important}.firewall-btn:hover{background:#0896da !important}div#firewall-steps button:disabled,.firewall-btn:disabled{background:#aaa !important;cursor:not-allowed}div#firewall-steps button .fa-circle-notch{color:#ddd}div#firewall-steps button span{display:none}div#firewall-steps button span.active{display:inline-block}div#firewall-steps button:focus{outline:none}.firewall-error{background:#fac2c2;padding:15px;border-radius:5px;margin-bottom:30px;color:#ca0000;display:none}.firewall-gen h4{text-align:center;font-size:16px;margin-top:0;color:#555;margin-bottom:40px !important}.firewall-gen h2{margin-bottom:10px !important}div#firewall-running{display:none;background:rgba(172,233,173,0.65);width:900px;margin:0 auto;color:#218b21;padding:20px;font-size:21px;line-height:1.5em;text-align:center;border:1px solid #3fe63f;border-radius:10px;max-width:100%}.wple-error{text-align:center;margin-bottom:30px}.wple-error span{background:#f2c4c4;padding:15px;border-radius:5px;font-size:18px;color:#cc1212}.wple-metrics-page{text-align:center}div#wple-firewall-metrics{font-size:21px}.wple-metrics-page canvas{min-height:400px;margin:20px 0}.wple-period{text-align:right;padding:0 20px}.wple-period select{font-size:18px;width:150px}div#wple-firewall-metrics svg,#wple-firewall-metrics i{font-size:30px}.wple-error-firewall{background:#fafafa;color:#222;padding:20px 15px;border:1px solid #ccc;border-radius:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:left;width:96%;margin-left:1%}.wple-error-firewall img{max-width:80px;margin:5px 20px 0 10px}.wple-error-firewall h3{font-size:26px}.wple-error-firewall p{color:#555}.wple-error-firewall strong{color:#111}.wple-error-firewall a:not(.metrics){text-decoration:none;display:inline-block;background:#4f4f4f;color:#fff;padding:15px;font-size:16px;border-radius:3px}.wple-upgrade-features{width:100%;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.wple-upgrade-features span{padding:10px;font-size:16px;line-height:1.4em;color:#777}.wple-upgrade-features b{color:#333;font-size:17px;display:inline-block;margin-bottom:8px}.wple-error-firewall a:hover{background:#444}.wple-error-firewall>div{margin-right:20px}.wple-error-firewall h3{color:#444 !important;font-size:22px !important;margin:0 0 5px !important;line-height:1.3em !important}.wple-error-firewall p{margin:5px 0}.wple-error-firewall span.dashicons{float:none !important;font-size:19px !important;color:#fff !important;width:20px !important;line-height:17px;padding:0}.wple-http-accessible{background:#fff;padding:10px;margin-bottom:10px}.wple-http-accessible p{margin-top:0;margin-bottom:5px}.wple-http-accessible div{font-weight:500;padding-bottom:10px;font-size:13px;color:#666}.wple-http-accessible div a:focus{-webkit-box-shadow:none;box-shadow:none}.wple-http-accessible div a{line-height:26px !important;color:#777 !important}.wple-http-accessible div a span{float:none !important;margin:0 !important;color:#777 !important;max-width:20px !important;line-height:20px}.wple-http-accessible div a span:before{font-size:19px}.subdir-http-challenge.manualchallenge a:hover,.subdir-http-challenge.manualchallenge a:hover span{color:#555 !important}div#wple-upgradepro .wple-plans{right:15px;text-align:right;position:absolute;bottom:15px;opacity:0.8}div#wple-upgradepro{position:relative;min-height:auto}.quick-refund-policy{text-align:center;color:#666;font-size:18px;margin-top:40px}.quick-refund-policy p{font-size:15px;margin:20px;font-weight:400}.quick-refund-policy strong{color:#333;text-transform:uppercase}.quick-refund-policy strong{color:#555;background:#f1f1f1;padding:10px 20px;font-size:15px}.wple-single-dv-ssl{text-align:center}.wple-info-box{background:#f9f9f9;display:inline-block;width:560px;max-width:100%;margin:0 0 20px 0;padding:20px;border-radius:5px;border:1px solid #eee}.wple-info-box h3{margin-top:0;margin-bottom:20px}.wple-info-box h3 span{margin-left:5px}.wple-info-box strong{font-size:16px;color:#666;margin-bottom:5px;display:block}.wple-www{display:none}.wple-www.active{display:block}.hideit{display:none}#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid{float:right;width:auto !important;margin:-5px 0 0 0 !important;font-size:21px !important}#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid a{text-decoration:none !important;font-size:16px;color:#047b04;line-height:30px}#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid span{font-size:23px;width:22px;color:#0c960c;line-height:30px;margin-right:5px}#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid a:hover,#wple-sslgenerator .subdir-challenges-block span.manual-verify-vid a:hover span{color:#444}#wple-sslgenerator .manualchallenge button span{font-size:21px !important;line-height:25px;width:22px !important}ul.wple-progress li a{text-decoration:none;color:inherit}ul.wple-progress li a:hover{color:#777}.wple-success-flex{display:-webkit-box;display:-ms-flexbox;display:flex;max-width:90%;margin:0 5%}.wple-success-flex-final{text-align:left;padding:15px 30px 0 30px !important}ul.download-ssl-certs li{line-height:1.5em;color:#666 !important}ul.download-ssl-certs ul li a{padding:3px 10px;font-size:14px;outline:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}ul.download-ssl-certs ul li{margin:10px 8px 0px 0px !important;border-radius:3px}.wple-success-flex{-ms-flex-pack:distribute;justify-content:space-around}.wple-success-flex-final{background:#f9f9f9;border:1px solid #eee;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:20px}.wple-success-cols a{font-weight:500;color:#039154;text-transform:uppercase;text-decoration:none;border-bottom:1px dotted}ul.download-ssl-certs ul{margin-left:2px}div#wple-completed{display:-webkit-box;display:-ms-flexbox;display:flex;padding:40px 60px 40px}.wple-completed-review{width:70%;background:url(../assets/banner-left.png) no-repeat center right}.wple-completed-remaining{width:30%;text-align:center}.wple-completed-review h2{margin-top:0 !important;text-align:left !important;font-size:32px !important;max-width:90%;color:#444 !important}.wple-completed-review p{font-size:25px;color:#777;max-width:90%;line-height:36px}.wple-completed-review p span{margin:0 5px;font-size:27px;line-height:38px;color:#ff8e00}.wple-completed-review a.letsrate{background:#007cb7;margin:40px 0 10px;display:inline-block;padding:13px 25px;color:#fff;text-decoration:none;font-size:21px;line-height:28px;border-radius:5px;margin-top:100px;letter-spacing:1px}.wple-completed-review a.letsrate span{font-size:28px;height:30px}.wple-completed-review small{display:block;font-size:14px;padding-left:37px;color:#aaa;text-transform:uppercase}.wple-completed-review .letsrenew{text-decoration:none;font-size:20px;margin-left:10px;text-transform:uppercase;font-weight:500;color:#ea0707}.wple-completed-review .letsrenew.disabled{color:#bbb}.download-certs li{margin:0 12px;text-transform:uppercase}.wple-circle-expires strong{font-size:17px;margin:10px 0;display:block}.wple-circle-expires strong b{color:#ea0707}.wple-circle-expires p{font-size:15px;color:#777}.firepro{font-size:17px;color:#218b21;margin-top:20px !important;background:#ecffec;padding:7px 10px !important;border-left:2px solid}.firepro a{color:#218b27;font-weight:600;text-decoration:none;border-bottom:1px dotted}.wple-error-firewall.wple-procdn{background:none;border:1px solid #eee;margin:0 0 20px 0;width:98%}.wple-success-cols.wple-three-cols div{width:calc(33.33% - 50px)}div#wple-scanner{text-align:center;font-size:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}div#wple-scanner input{border:1px solid #ccc;margin:0 5px;padding:10px;min-width:300px;font-size:16px}div#wple-scanner button{background:#0092c9;color:#fff;border:none;padding:12px 20px;border-radius:5px;cursor:pointer}div#wple-scanner button:disabled{background:#bbb !important}div#wple-scanner-iframe{height:0px;overflow:hidden;-webkit-transition:all 0.5s ease;transition:all 0.5s ease;margin:40px 0;position:relative}div#wple-scanner-iframe .wple-frameholder{width:500px;height:500px;border:1px solid #ddd;margin:0 auto;border-radius:5px}div#wple-scanner-iframe .wple-frameholder iframe{overflow:hidden}div#wple-scanner-iframe .wple-scanbar{width:510px;border:3px solid #ddd;position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);border-radius:15px;-webkit-animation:scanner 5s ease-in-out forwards alternate infinite;animation:scanner 5s ease-in-out forwards alternate infinite}.wple-frameholder:after{content:'';position:absolute;z-index:9999;top:0;bottom:0;left:0;right:0}.complete.wple-scanbar{background:#0073aa;text-align:center;padding:15px;color:#fff;font-size:16px;font-weight:600;border-width:1px !important}.complete.wple-scanbar.success{background:#00bc28}div#wple-scanresults table{margin:40px auto}div#wple-scanresults{text-align:center}div#wple-scanresults table{border-collapse:collapse}div#wple-scanresults table td,div#wple-scanresults table th{padding:10px;font-size:16px;text-align:left;border:1px solid #ddd}div#wple-scanresults small{font-size:14px}div#wple-upgradepro>strong{font-size:14px;font-weight:500}ul#wple-nav{text-align:right}ul#wple-nav li{display:inline-block;margin:15px 5px}ul#wple-nav li a{text-decoration:none;color:#fff;font-size:15px;font-weight:400;padding:8px 15px;background:#ffffff2e;border-radius:5px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}ul#wple-nav li a:hover{background:#ffffff59}ul#wple-nav li a span{margin-right:5px}ul#wple-nav li a:focus{-webkit-box-shadow:none;box-shadow:none}span.wple-pmode{color:#ddd;border:1px solid #ddd;padding:2px 4px;border-radius:5px;font-size:10px;letter-spacing:1px}.dashicons-update{font-size:26px;width:26px;height:26px;margin:5px -5px 0 0}.dashicons.keeprotating{-webkit-animation:infirotate 1s linear forwards infinite;animation:infirotate 1s linear forwards infinite}.wple-deact{padding:10px 20px;background:rgba(255,158,158,0.2);margin:-20px 20px 0}.hiddenplan{display:none !important}div#wple-upgradepro>strong{padding:11px 20px;background:#f5f5f5;display:inline-block !important;-webkit-transform:translateY(-21px);transform:translateY(-21px);border-radius:0 0 8px 8px;-webkit-box-shadow:0px 2px 10px #ddd;box-shadow:0px 2px 10px #ddd}div#wple-upgradepro{text-align:center}li.onprocess1{color:orange !important}ul.check-root-ssh li{display:inline-block;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa;font-size:21px;padding:15px 20px;margin:5px 10px;min-width:200px;color:#666;cursor:pointer;border-radius:5px}ul.check-root-ssh{text-align:center}ul.check-root-ssh li:hover{background:#f1f1f1}ul.check-root-ssh li.active{background:#aaa;color:#fff}.rootssh-check{text-align:center;margin:20px 0}.nocp-ssl-validation{text-align:center}.nocp-ssl-validation small{display:block;font-size:13px;color:#777}.wple-validate-nossl{color:red;font-size:16px;line-height:1.5em;display:none}.wple-firewallcomplete{width:70%}.wple-powerofcdn{width:25%;border-left:1px solid #ddd;margin-left:1%;padding:20px 2%;text-align:center;font-size:18px}div#wple-sslgen.firewall-complete{display:-webkit-box;display:-ms-flexbox;display:flex}.wple-powerofcdn p{font-size:16px;text-align:left}.wple-powerofcdn .dashicons{font-size:100px;width:100px;height:100px}.wple-powerofcdn button{background:#444;border:none}.wple-powerofcdn button a{text-decoration:none;color:#fff;padding:20px;display:inline-block;text-transform:uppercase;letter-spacing:0.5px;font-size:16px}.wple-powerofcdn button:hover{background:#555}.wple-powerofcdn button a:focus{outline:none !important;-webkit-box-shadow:none;box-shadow:none}.wple-powerofcdn small{color:#888;margin:30px 0;display:block;line-height:1.4em}li.spmode-dns-apply a{background:#dab13d;color:#fff;text-decoration:none;padding:5px 10px;border-radius:5px;font-weight:600;text-transform:uppercase;-webkit-box-shadow:none;box-shadow:none}li.spmode-dns-apply{list-style:none !important}#firewall-dns button#firewall-dns-validate{margin-top:20px}li.spmode-dns-apply a:hover{background:#82da82}.wple-assets-count ul{text-align:left;width:90%;margin:0 5%}.wple-assets-count ul li{margin:5px 0;display:block;line-height:1.5em;color:#777;font-size:15px}.wple-assets-count ul li b{color:#e83434 !important}.wple-assets-count{background:#f5f5f5;padding:10px;border-radius:5px}h2 .dashicons-superhero{font-size:36px;width:34px;line-height:44px;height:44px}.wple-circle-expires strong{display:inline}span.wple-pmode span{position:absolute;margin-top:28px;margin-left:10px;color:#ddd !important}.spmode-dns-setup{background:#fff;border:1px solid #ddd;padding:20px;padding-bottom:0;border-radius:10px}.wple-hire-expert a{line-height:22px;text-decoration:none;display:inline-block;margin-top:12px;font-size:14px;color:#999;text-transform:uppercase;letter-spacing:1px;max-width:80%}.wple-hire-expert a:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}.wple-hire-expert a:hover{color:#0389bc}div#wple-upgradepro.wple-expert-block{padding:0;max-width:100% !important;width:1540px;border:1px solid #ddd}.wple-expert-block h2{font-size:18px !important;line-height:1.5em;font-weight:700;margin:0 !important;background:#f5f5f5;padding:30px 20px;border-radius:10px 0 0 10px;color:#757575}.wple-expert-block p{text-align:left;padding:0 20px;font-size:15px;margin:0}.wple-expert-actions .wple-expert-more{font-size:13px;padding:0;background:none !important;color:#888;-webkit-box-shadow:none;box-shadow:none;line-height:22px;font-weight:400}.wple-expert-actions .wple-expert-more span:before{color:#888}a.wple-expert-hire{background:none;color:#0389bc;font-weight:500;border:2px solid #0389bc;-webkit-box-shadow:none;box-shadow:none;font-size:15px;line-height:1.5em;padding:10px 25px;min-width:100px}a.wple-expert-hire:hover{color:#fff;background:#0389bc}.wple-firewallcomplete .wple-expert-block{margin:20px 0 !important;-webkit-box-shadow:none !important;box-shadow:none !important}.wple-firewallcomplete .wple-expert-block h2{font-size:16px !important;margin:0 !important}.wple-firewallcomplete .wple-expert-block p{font-size:15px}.wple-firewallcomplete .wple-expert-block .wple-expert-hire{font-size:14px;padding:10px 7px}.wple-firewallcomplete .wple-expert-block .wple-expert-actions{width:400px}.wple-deact{margin:-20px 0px 0;border-radius:5px}.firewall-complete #wple-completed{padding:30px 40px}.firewall-complete a.wple-expert-hire{margin:5px 0 !important;padding:10px 20px !important}span.wple-pmode.notproerror{border-color:red;color:red;font-weight:600;text-transform:capitalize}.wple-http-manual-verify{padding-bottom:0px !important}ul.step3-download .le-dwnld .dashicons{float:right !important}ul.step3-download .le-dwnld .dashicons:before{font-size:24px !important}ul.step3-download .le-dwnld a{text-decoration:none;padding:0 !important}ul.step3-download .le-dwnld{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fefefe;padding:10px 10px 10px 15px;border:1px solid #f1f1f1;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;border-radius:3px;font-weight:500;font-size:16px !important}span.copy-dwnld-icons{display:inline-block}ul.step3-download .le-dwnld .dashicons{font-size:24px !important;width:30px !important;cursor:pointer;color:#666 !important}ul.step3-download .le-dwnld .dashicons:hover{color:green !important}ul.step3-download{margin-bottom:20px}.crt-content textarea{width:100%;height:150px;background:none;border:1px solid #ddd;display:none}.copied-success{position:fixed;z-index:9999;top:50%;left:calc(50% - 80px);background:rgba(0,0,0,0.7);color:#fff;padding:15px 20px;border-radius:10px;display:none}.wple-no-certs{font-size:16px;background:#f5f5f5;padding:15px;border-left:5px solid #e81e1e}.wple-other-content{width:100%}.wple-other-plugins{display:none}div#wple-sslgen.wple-subpages{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.wple-other-plugins img{max-width:100px;margin-right:20px}.wple-other-plugins div a{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-line-pack:center;align-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:0 0 10px 0;background:#f5f5f5;padding:15px 20px;width:calc(100% - 40px);text-decoration:none}.wple-other-plugins div a:hover{background:#f1f1f1}.wple-other-plugins h3{text-transform:uppercase;font-size:14px}ul#wple-debug-errors{text-align:left;margin:20px 15px 0 15px}ul#wple-debug-errors li{line-height:1.5em;font-size:15px !important;color:#a20101 !important;margin-bottom:15px !important;background:rgba(255,0,0,0.08);padding:15px;border-radius:3px}label.disabled{color:#999}.wple-ssl-score,.wple-ssl-settings{background:#fff;-webkit-box-shadow:0px 0px 10px #ddd;box-shadow:0px 0px 10px #ddd;padding:30px;border-radius:5px;margin:10px}.wple-ssl-score h2,.wple-ssl-settings h2{margin-top:0;font-size:24px;text-transform:uppercase}div#wple-ssl-health{margin:40px 0px;display:-webkit-box;display:-ms-flexbox;display:flex;width:99%}.wple-ssl-score{width:calc(59% - 40px)}.wple-ssl-settings{width:calc(40% - 40px)}.wple-ssl-score h2:after,.wple-ssl-settings h2:after{content:'';display:block;background:#eee;width:50px;height:5px;margin-top:20px}.wple-score{font-size:60px;line-height:1.3em;font-weight:600}.wple-scorebar{width:100%;height:20px;background:#eee;margin:10px 0 30px;border-radius:5px;position:relative;-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}.wple-scorebar span{position:absolute;top:0;display:block;left:0;bottom:0;border-radius:5px}.wple-ssl-score ul li span:not(.dashicons){margin-right:20px;background:#f34343;padding:4px 8px;display:inline-block;width:25px;text-align:center;text-transform:capitalize;border-radius:5px;font-weight:500;color:#fff}.wple-ssl-score ul li span.dashicons{padding:4px;display:inline-block;width:25px}.wple-ssl-score ul li{margin-bottom:14px}.wple-ssl-score ul li span.wple-yes{background:#5dc55d;color:#fff}.wple-ssl-settings label{cursor:default;float:left}.wple-ssl-settings .plan-toggler{margin:0 !important}.wple-ssl-settings .plan-toggler label{cursor:pointer !important}.wple-ssl-settings ul li{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:100% !important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.wple-ssl-settings .toggle-checkbox:checked+.toggle-switch{background:#5dc55d}.wple-ssl-settings ul li.wple-setting-error{background:#fda7a78c;padding:10px;text-align:center;margin:20px 0 20px -10px;color:#a71616;border-radius:5px;display:none}span.wple-share-success{margin:0 !important}span.wple-share-success a:hover{background:#ff8e00}span.wple-share-success a{width:28px;font-size:14px;text-decoration:none;line-height:28px;display:inline-block;text-align:center;background:#999;color:white;border-radius:50%;-webkit-transform:translateY(-2px);transform:translateY(-2px);-webkit-transition:all 0.5s ease;transition:all 0.5s ease}span.wple-share-success a:focus{outline:none;-webkit-box-shadow:none;box-shadow:none}span.wple-share-success a.tw:hover{background:#1da1f2}span.wple-share-success a.fb:hover{background:#1877f2}span.wple-share-success a.rd:hover{background:#ff4500}span.wple-share-success a.pt:hover{background:#e60023}table#wple-advanced-scanner th{background:#f5f5f591;padding:10px}table#wple-advanced-scanner .wple-scan-head{background:#444;padding:10px;color:#fff}table#wple-advanced-scanner tr td{border:1px solid #ddd !important;padding:10px}table#wple-advanced-scanner{border-collapse:collapse}table#wple-advanced-scanner .issue_type{text-align:center;text-transform:capitalize;font-weight:500}table#wple-advanced-scanner th{border:1px solid #ddd}table#wple-advanced-scanner small{font-size:12px;font-weight:500}table#wple-advanced-scanner small strong{font-weight:700}table#wple-advanced-scanner th{font-size:16px;font-weight:600}.progress--circle{position:relative;display:inline-block;margin:1rem;width:300px;height:300px;border-radius:50%;background-color:#ddd}.progress--circle:before{content:'';position:absolute;top:10px;left:10px;width:280px;height:280px;border-radius:50%;background-color:white}.progress--circle:after{content:'';display:inline-block;width:100%;height:100%;border-radius:50%;background-color:#05b267}.progress__number{position:absolute;top:50%;width:100%;line-height:1;text-align:center;color:#777;font-size:2rem;margin-top:-1.75rem}.progress__number small{font-size:1.25rem}.progress--circle.progress--0:after{background-image:-webkit-gradient(linear, left top, right top, color-stop(50%, #ddd), color-stop(50%, transparent), to(transparent)),-webkit-gradient(linear, left top, right top, color-stop(50%, #ea0707), color-stop(50%, #ddd), to(#ddd));background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(90deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--1:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(94deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--2:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(98deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--3:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(102deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--4:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(106deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--5:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(110deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--6:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(114deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--7:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(118deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--8:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(122deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--9:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(126deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--10:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(130deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--11:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(134deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--12:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(138deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--13:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(142deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--14:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(146deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--15:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(150deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--16:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(154deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--17:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(158deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--18:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(162deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--19:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(166deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--20:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(170deg, #ea0707 50%, #ddd 50%, #ddd);background-color:#ea0707}.progress--circle.progress--21:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(174deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--22:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(178deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--23:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(182deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--24:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(186deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--25:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(190deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--26:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(194deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--27:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(198deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--28:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(202deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--29:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(206deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--30:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(210deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--31:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(214deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--32:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(218deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--33:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(222deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--34:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(226deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--35:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(230deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--36:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(234deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--37:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(238deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--38:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(242deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--39:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(246deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--40:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(250deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--41:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(254deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--42:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(258deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--43:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(262deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--44:after{background-image:linear-gradient(90deg, #ddd 50%, transparent 50%, transparent),linear-gradient(266deg, orange 50%, #ddd 50%, #ddd);background-color:orange}.progress--circle.progress--45:after{background-image:-webkit-gradient(linear, right top, left top, color-stop(50%, #05b267), color-stop(50%, transparent), to(transparent)),-webkit-gradient(linear, right top, left top, color-stop(50%, #05b267), color-stop(50%, #ddd), to(#ddd));background-image:linear-gradient(-90deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--46:after{background-image:linear-gradient(-86deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--47:after{background-image:linear-gradient(-82deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--48:after{background-image:linear-gradient(-78deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--49:after{background-image:linear-gradient(-74deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--50:after{background-image:linear-gradient(-70deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--51:after{background-image:linear-gradient(-66deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--52:after{background-image:linear-gradient(-62deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--53:after{background-image:linear-gradient(-58deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--54:after{background-image:linear-gradient(-54deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--55:after{background-image:linear-gradient(-50deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--56:after{background-image:linear-gradient(-46deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--57:after{background-image:linear-gradient(-42deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--58:after{background-image:linear-gradient(-38deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--59:after{background-image:linear-gradient(-34deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--60:after{background-image:linear-gradient(-30deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--61:after{background-image:linear-gradient(-26deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--62:after{background-image:linear-gradient(-22deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--63:after{background-image:linear-gradient(-18deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--64:after{background-image:linear-gradient(-14deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--65:after{background-image:linear-gradient(-10deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--66:after{background-image:linear-gradient(-6deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--67:after{background-image:linear-gradient(-2deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--68:after{background-image:linear-gradient(2deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--69:after{background-image:linear-gradient(6deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--70:after{background-image:linear-gradient(10deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--71:after{background-image:linear-gradient(14deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--72:after{background-image:linear-gradient(18deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--73:after{background-image:linear-gradient(22deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--74:after{background-image:linear-gradient(26deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--75:after{background-image:linear-gradient(30deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--76:after{background-image:linear-gradient(34deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--77:after{background-image:linear-gradient(38deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--78:after{background-image:linear-gradient(42deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--79:after{background-image:linear-gradient(46deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--80:after{background-image:linear-gradient(50deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--81:after{background-image:linear-gradient(54deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--82:after{background-image:linear-gradient(58deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--83:after{background-image:linear-gradient(62deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--84:after{background-image:linear-gradient(66deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--85:after{background-image:linear-gradient(70deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--86:after{background-image:linear-gradient(74deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--87:after{background-image:linear-gradient(78deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--88:after{background-image:linear-gradient(82deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--89:after{background-image:linear-gradient(86deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}.progress--circle.progress--90:after{background-image:-webkit-gradient(linear, left top, right top, color-stop(50%, #05b267), color-stop(50%, transparent), to(transparent)),-webkit-gradient(linear, right top, left top, color-stop(50%, #05b267), color-stop(50%, #ddd), to(#ddd));background-image:linear-gradient(90deg, #05b267 50%, transparent 50%, transparent),linear-gradient(270deg, #05b267 50%, #ddd 50%, #ddd)}@-webkit-keyframes scanner{0%{top:0}100%{top:99%}}@keyframes scanner{0%{top:0}100%{top:99%}}@-webkit-keyframes infirotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes infirotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@media (max-width: 1200px){ul.wple-progress{width:100%;-ms-flex-wrap:wrap;flex-wrap:wrap}ul.wple-progress li{font-size:14px;font-weight:400}.wple-success-flex{-ms-flex-wrap:wrap;flex-wrap:wrap}.wple-success-flex-final{padding:15px 20px 0 20px;margin-left:0}.wple-success-flex-video{margin-bottom:20px}.wple-success-cols{-ms-flex-wrap:wrap;flex-wrap:wrap}.wple-success-cols div{width:44%;margin:10px 0}}@media (max-width: 1024px){.wple-plan-compare{-ms-flex-wrap:wrap;flex-wrap:wrap}.wple-compare-item{width:23%}.wple-upgrade-pro{-ms-flex-wrap:wrap;flex-wrap:wrap}}@media (max-width: 991px){#le-tabbed-sections{width:100%}div#le-tabs-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.le-other-plugins{padding:20px 0}div#wple-ssl-health{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}div#wple-ssl-health>div{width:88%}}@media (max-width: 767px){.toplevel_page_wp_encryption #wpcontent{background-size:auto}.wple-compare-item{width:34%;margin:10px 8%}div#wple-upgradepro{min-height:auto}.wple-other-plugins{display:none}.wple-other-content{width:100%}}h4.pricing-intro-subhead .dashicons{height:25px}div#quick-pricing-table{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center;margin:100px 20px 60px 20px}div#quick-pricing-table .wplepricingcol{width:330px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-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:justify;-ms-flex-pack:justify;justify-content:space-between}.pro-pricing-col.wplepricingcol{border:1px solid #ddd;-webkit-transform:scale(1.1);transform:scale(1.1);border-radius:5px;background:#fff}.wplepricingcol ul li{list-style:none;font-size:18px;line-height:20px;min-height:20px;padding:22px 10px;border-bottom:1px solid #ddd;margin:0}.free-pricing-col.wplepricingcol{margin-right:1%;border:1px solid #ddd;border-radius:5px 0 0}.quick-pricing-head h3{font-size:32px;margin:0;font-weight:300;min-height:50px}.quick-pricing-head large{font-size:40px}.quick-pricing-head{padding:40px 0px;background:#fafafa;min-height:80px;width:100%}div#quick-pricing-table ul{margin:0}div#quick-pricing-table .pricing-btn-block{height:40px;margin-top:30px;margin-bottom:10px}div#quick-pricing-table .pricing-btn-block a{background:#222;text-decoration:none;color:#fff;text-transform:uppercase;font-size:15px;padding:5px 18px 7px;border-radius:5px}.wplepricingcol ul li:last-child{border:none}.pro-pricing-col li{font-size:16px !important}.pro-pricing-col li a{color:#097fb7;text-decoration:none;border-bottom:1px dotted #0073aa}.wplepricingcol ul li{text-transform:capitalize}.pro-pricing-col li a:focus{outline:none !important;-webkit-box-shadow:none !important;box-shadow:none !important}div#quick-pricing-table .pricing-btn-block a:hover{background:#333 !important}.pro-pricing-col.wplepricingcol .pricing-btn-block a{background:#1093d1 !important}.quick-price-row small{font-size:18px}.quick-price-row sup{font-size:20px;font-weight:500}h4.pricing-intro-subhead{font-size:18px;font-weight:400;margin-top:10px;text-align:center;color:#666;line-height:1.4em}h2.pricing-intro-head{margin-bottom:0px !important}.non-cpanel-plans .pro-pricing-col ul li{padding:17px 10px}.free-pricing-col{-webkit-box-pack:start !important;-ms-flex-pack:start !important;justify-content:flex-start !important}.quick-pricing-head{border-radius:5px 5px 0 0}.quick-pricing-head.pro{min-height:100px}.wplepricingcol.firewallplan .quick-pricing-head{min-height:100px}.inro-pricing-refund{clear:both;display:block;text-align:right}.quick-pricing-head{position:relative;overflow:hidden}span.wple-trending{position:absolute;top:16px;right:-40px;-webkit-transform:rotate(45deg);transform:rotate(45deg);background:#0990d1;color:#fff;padding:5px 45px;-webkit-box-shadow:0px 0px 5px #8c9497;box-shadow:0px 0px 5px #8c9497}.subdir-http-challenge.manualchallenge{position:relative}.wple-no-http{position:absolute;background:rgba(255,255,255,0.9);top:0;left:0;bottom:0;right:0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:30px;text-align:center;border-radius:10px;font-weight:500;font-size:21px;color:#777;line-height:1.5em}.wple-error-firewall.fire-pro .wple-upgrade-features span{width:23%}.wple-upgrade-features span strong{color:#555}.wple-upgrade-features span a:hover{background:none}.wple-upgrade-features span a{text-decoration:none;border-bottom:1px dotted}.wple-error-firewall.fire-pro .wple-upgrade-features{margin-top:-10px;margin-bottom:-10px;margin-right:0}.toggle{cursor:pointer;display:inline-block}.toggle-switch{display:inline-block;background:#ccc;border-radius:16px;width:58px;height:32px;position:relative;vertical-align:middle;-webkit-transition:background 0.25s;transition:background 0.25s}.toggle-switch:before,.toggle-switch:after{content:""}.toggle-switch:before{display:block;background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee));background:linear-gradient(to bottom, #fff 0%, #eee 100%);border-radius:50%;-webkit-box-shadow:0 0 0 1px rgba(0,0,0,0.25);box-shadow:0 0 0 1px rgba(0,0,0,0.25);width:24px;height:24px;position:absolute;top:4px;left:4px;-webkit-transition:left 0.25s;transition:left 0.25s}.toggle:hover .toggle-switch:before{background:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#fff));background:linear-gradient(to bottom, #fff 0%, #fff 100%);-webkit-box-shadow:0 0 0 1px rgba(0,0,0,0.5);box-shadow:0 0 0 1px rgba(0,0,0,0.5)}.toggle-checkbox:checked+.toggle-switch{background:#0073aa}.toggle-checkbox:checked+.toggle-switch:before{left:30px}.toggle-checkbox{position:absolute;visibility:hidden}.toggle-label{margin-left:5px;position:relative;top:2px;font-size:17px;color:#666}.plan-toggler{text-align:center;margin:0 0 20px -40px}.plan-toggler>span{margin-right:10px;font-size:18px;color:#666}.wildcard-genform{display:none}.wple-wc{display:none}.wple-wc.active{display:block}.wple-restart-notice{margin:0 60px;font-size:18px;line-height:1.5em;background:#fffbc7;padding:20px;border-radius:7px;color:#555}.wple-restart-notice a{text-decoration:none}
|
2 |
+
/*# sourceMappingURL=le-admin.min.css.map */
|
admin/css/le-admin.min.css.map
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"version": 3,
|
3 |
+
"mappings": "AAAA,AAAA,WAAW,CAAC,MAAM,AAAC,CACjB,UAAU,CAAE,OAAO,CACnB,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,OAAO,CAAE,IAAI,CACb,MAAM,CAAE,OAAO,CACf,kBAAkB,CAAE,gBAAgB,CACpC,UAAU,CAAE,gBAAgB,CAC5B,UAAU,CAAE,IAAI,CAChB,aAAa,CAAE,IAAI,CACnB,OAAO,CAAE,IAAI,CACb,aAAa,CAAE,GAAG,CAClB,cAAc,CAAE,KAAK,CAKtB,AAjBD,AAcE,WAdS,CAAC,MAAM,AAcf,MAAM,AAAC,CACN,UAAU,CAAE,OAAO,CACpB,AAGH,AAAA,GAAG,AAAA,QAAQ,AAAC,CACV,KAAK,CAAE,IAAI,CACX,UAAU,CAAE,IAAI,CACjB,AAED,AAAA,CAAC,AAAA,SAAS,AAAC,CACT,KAAK,CAAE,KAAK,CACb,AAED,AAAA,SAAS,AAAC,CACR,OAAO,CAAE,YAAY,CACrB,OAAO,CAAE,CAAC,CACV,KAAK,CAAE,IAAI,CACZ,AAED,AAAA,QAAQ,CAAC,EAAE,AAAC,CACV,SAAS,CAAE,IAAI,CACf,UAAU,CAAE,CAAC,CACd,AAED,AAAA,YAAY,AAAC,CACX,UAAU,CAAE,OAAO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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($) {
|
2 |
+
"use strict";
|
3 |
+
|
4 |
+
$(".le-section-title").click(function () {
|
5 |
+
var scn = $(this).attr("data-section");
|
6 |
+
$(".le-section-title").removeClass("active");
|
7 |
+
$(this).addClass("active");
|
8 |
+
|
9 |
+
localStorage.setItem('le-state', scn);
|
10 |
+
|
11 |
+
$(".le-section.active").fadeOut("fast").removeClass("active").promise().done(function () {
|
12 |
+
$("." + scn).fadeIn("fast").addClass("active");
|
13 |
+
});
|
14 |
+
|
15 |
+
});
|
16 |
+
|
17 |
+
//restore last tab
|
18 |
+
if (localStorage.getItem('le-state') !== null) {
|
19 |
+
var section = localStorage.getItem('le-state');
|
20 |
+
|
21 |
+
$(".le-section-title[data-section=" + section + "]").click();
|
22 |
+
}
|
23 |
+
|
24 |
+
// Since 2.5.0
|
25 |
+
$('.wple-tooltip').each(function () {
|
26 |
+
var $this = $(this);
|
27 |
+
|
28 |
+
tippy('.wple-tooltip:not(.bottom)', {
|
29 |
+
//content: $this.attr('data-content'),
|
30 |
+
placement: 'top',
|
31 |
+
onShow(instance) {
|
32 |
+
instance.popper.hidden = instance.reference.dataset.tippy ? false : true;
|
33 |
+
instance.setContent(instance.reference.dataset.tippy);
|
34 |
+
}
|
35 |
+
//arrow: false
|
36 |
+
});
|
37 |
+
|
38 |
+
tippy('.wple-tooltip.bottom', {
|
39 |
+
//content: $this.attr('data-content'),
|
40 |
+
placement: 'bottom',
|
41 |
+
onShow(instance) {
|
42 |
+
instance.popper.hidden = instance.reference.dataset.tippy ? false : true;
|
43 |
+
instance.setContent(instance.reference.dataset.tippy);
|
44 |
+
}
|
45 |
+
//arrow: false
|
46 |
+
});
|
47 |
+
});
|
48 |
+
|
49 |
+
$(".toggle-debugger").click(function () {
|
50 |
+
$(this).find("span").toggleClass("rotate");
|
51 |
+
|
52 |
+
$(".le-debugger").slideToggle('fast');
|
53 |
+
});
|
54 |
+
|
55 |
+
//since 4.6.0
|
56 |
+
$("#admin-verify-dns").submit(function (e) {
|
57 |
+
e.preventDefault();
|
58 |
+
|
59 |
+
var $this = $(this);
|
60 |
+
|
61 |
+
jQuery.ajax({
|
62 |
+
method: "POST",
|
63 |
+
url: ajaxurl,
|
64 |
+
dataType: "text",
|
65 |
+
data: {
|
66 |
+
action: 'wple_admin_dnsverify',
|
67 |
+
nc: $("#checkdns").val()
|
68 |
+
},
|
69 |
+
beforeSend: function () {
|
70 |
+
$(".dns-notvalid").removeClass("active");
|
71 |
+
$this.addClass("buttonrotate");
|
72 |
+
$this.find("button").attr("disabled", true);
|
73 |
+
},
|
74 |
+
error: function () {
|
75 |
+
$(".dns-notvalid").removeClass("active");
|
76 |
+
$this.removeClass("buttonrotate");
|
77 |
+
$this.find("button").removeAttr("disabled");
|
78 |
+
alert("Something went wrong! Please try again");
|
79 |
+
},
|
80 |
+
success: function (response) {
|
81 |
+
$this.removeClass("buttonrotate");
|
82 |
+
$this.find("button").removeAttr("disabled");
|
83 |
+
|
84 |
+
if (response === '1') {
|
85 |
+
$this.find("button").text("Verified");
|
86 |
+
setTimeout(function () {
|
87 |
+
window.location.href = window.location.href + "&wpleauto=dns";
|
88 |
+
exit();
|
89 |
+
}, 1000);
|
90 |
+
|
91 |
+
// } else if (response !== 'fail') {
|
92 |
+
// alert("Partially verified. Could not verify " + String(response));
|
93 |
+
} else {
|
94 |
+
$(".dns-notvalid").addClass("active");
|
95 |
+
}
|
96 |
+
}
|
97 |
+
});
|
98 |
+
|
99 |
+
return false;
|
100 |
+
});
|
101 |
+
|
102 |
+
//since 4.7.0
|
103 |
+
$("#verify-subdns").click(function (e) {
|
104 |
+
e.preventDefault();
|
105 |
+
|
106 |
+
var $this = $(this);
|
107 |
+
|
108 |
+
jQuery.ajax({
|
109 |
+
method: "POST",
|
110 |
+
url: ajaxurl,
|
111 |
+
dataType: "text",
|
112 |
+
data: {
|
113 |
+
action: 'wple_admin_dnsverify',
|
114 |
+
nc: $this.prev().val()
|
115 |
+
},
|
116 |
+
beforeSend: function () {
|
117 |
+
$(".dns-notvalid").removeClass("active");
|
118 |
+
$this.addClass("buttonrotate");
|
119 |
+
$this.attr("disabled", true);
|
120 |
+
$("#wple-letsdebug").html("");
|
121 |
+
},
|
122 |
+
error: function () {
|
123 |
+
$(".dns-notvalid").removeClass("active");
|
124 |
+
$this.removeClass("buttonrotate");
|
125 |
+
$this.removeAttr("disabled");
|
126 |
+
alert("Something went wrong! Please try again");
|
127 |
+
},
|
128 |
+
success: function (response) {
|
129 |
+
$this.removeClass("buttonrotate");
|
130 |
+
$this.removeAttr("disabled");
|
131 |
+
|
132 |
+
if (response === '1') {
|
133 |
+
$this.text("Verified");
|
134 |
+
$("#wple-error-popper .wple-error").hide();
|
135 |
+
$("#wple-error-popper").fadeIn('fast');
|
136 |
+
$("#wple-error-popper .wple-flex img").show();
|
137 |
+
|
138 |
+
setTimeout(function () {
|
139 |
+
window.location.href = window.location.href + "&subdir=1&wpleauto=dns";
|
140 |
+
exit();
|
141 |
+
}, 1000);
|
142 |
+
|
143 |
+
// } else if (response !== 'fail') {
|
144 |
+
// alert("Partially verified. Could not verify " + String(response));
|
145 |
+
} else {
|
146 |
+
|
147 |
+
if (response.indexOf("ul") >= 0) {
|
148 |
+
$("#wple-letsdebug").html(response);
|
149 |
+
}
|
150 |
+
|
151 |
+
$(".dns-notvalid").addClass("active");
|
152 |
+
}
|
153 |
+
}
|
154 |
+
});
|
155 |
+
|
156 |
+
return false;
|
157 |
+
});
|
158 |
+
|
159 |
+
$("#verify-subhttp").click(function (e) {
|
160 |
+
e.preventDefault();
|
161 |
+
|
162 |
+
var $this = $(this);
|
163 |
+
|
164 |
+
jQuery.ajax({
|
165 |
+
method: "POST",
|
166 |
+
url: ajaxurl,
|
167 |
+
dataType: "text",
|
168 |
+
data: {
|
169 |
+
action: 'wple_admin_httpverify',
|
170 |
+
nc: $this.prev().val()
|
171 |
+
},
|
172 |
+
beforeSend: function () {
|
173 |
+
$(".http-notvalid").removeClass("active");
|
174 |
+
$this.addClass("buttonrotate");
|
175 |
+
$this.attr("disabled", true);
|
176 |
+
$("#wple-letsdebug").html("");
|
177 |
+
},
|
178 |
+
error: function () {
|
179 |
+
$(".http-notvalid").removeClass("active");
|
180 |
+
$this.removeClass("buttonrotate");
|
181 |
+
$this.removeAttr("disabled");
|
182 |
+
alert("Something went wrong! Please try again");
|
183 |
+
},
|
184 |
+
success: function (response) {
|
185 |
+
$this.removeClass("buttonrotate");
|
186 |
+
$this.removeAttr("disabled");
|
187 |
+
|
188 |
+
if (response === '1') {
|
189 |
+
$this.text("Verified");
|
190 |
+
$("#wple-error-popper .wple-error").hide();
|
191 |
+
$("#wple-error-popper").fadeIn('fast');
|
192 |
+
$("#wple-error-popper .wple-flex img").show();
|
193 |
+
|
194 |
+
setTimeout(function () {
|
195 |
+
window.location.href = window.location.href + "&subdir=1&wpleauto=http";
|
196 |
+
return false;
|
197 |
+
}, 1000);
|
198 |
+
|
199 |
+
// } else if (response !== 'fail') {
|
200 |
+
// alert("Partially verified. Could not verify " + String(response));
|
201 |
+
} else {
|
202 |
+
|
203 |
+
if (response.indexOf("ul") >= 0) {
|
204 |
+
$("#wple-letsdebug").html(response);
|
205 |
+
}
|
206 |
+
|
207 |
+
$(".http-notvalid").addClass("active");
|
208 |
+
}
|
209 |
+
}
|
210 |
+
});
|
211 |
+
|
212 |
+
return false;
|
213 |
+
});
|
214 |
+
|
215 |
+
//since 4.7.1
|
216 |
+
$("#singledvssl").click(function (e) {
|
217 |
+
//e.preventDefault();
|
218 |
+
|
219 |
+
var flag = 0;
|
220 |
+
if ($("input.wple_email").val() == '') {
|
221 |
+
flag = 1;
|
222 |
+
$("#wple-error-popper .wple-error").text('Email address is required');
|
223 |
+
$("#wple-error-popper").fadeIn('slow');
|
224 |
+
} else if (!$("input.wple_agree_le").is(":checked") || !$("input.wple_agree_gws").is(":checked")) {
|
225 |
+
flag = 1;
|
226 |
+
$("#wple-error-popper .wple-error").text('Agree to TOS required');
|
227 |
+
$("#wple-error-popper").fadeIn('slow');
|
228 |
+
}
|
229 |
+
|
230 |
+
if (flag == 0) {
|
231 |
+
$("#wple-error-popper .wple-error").hide();
|
232 |
+
$("#wple-error-popper").fadeIn('fast');
|
233 |
+
$("#wple-error-popper .wple-flex img").show();
|
234 |
+
//$(this).closest(".le-genform").submit();
|
235 |
+
} else {
|
236 |
+
setTimeout(function () {
|
237 |
+
$("#wple-error-popper").fadeOut(500);
|
238 |
+
}, 2000);
|
239 |
+
return false;
|
240 |
+
}
|
241 |
+
|
242 |
+
});
|
243 |
+
|
244 |
+
|
245 |
+
|
246 |
+
$(".wple_include_www").change(function () {
|
247 |
+
if ($(this).is(":checked")) {
|
248 |
+
|
249 |
+
var $this = $(this);
|
250 |
+
|
251 |
+
$.ajax({
|
252 |
+
type: "GET",
|
253 |
+
url: ajaxurl,
|
254 |
+
async: true,
|
255 |
+
dataType: 'text',
|
256 |
+
data: {
|
257 |
+
action: 'wple_include_www',
|
258 |
+
nc: $("#letsencrypt").attr("value")
|
259 |
+
},
|
260 |
+
beforeSend: function () {
|
261 |
+
|
262 |
+
},
|
263 |
+
error: function () {
|
264 |
+
alert("Something went wrong. Please re-try..");
|
265 |
+
},
|
266 |
+
success: function (response) {
|
267 |
+
if (response !== '1') {
|
268 |
+
$this.removeAttr("checked");
|
269 |
+
|
270 |
+
if (response == 'www') {
|
271 |
+
alert("Your www domain is not reachable, so this option cannot be enabled.");
|
272 |
+
} else if (response == 'nonwww') {
|
273 |
+
alert("Your non-www domain is not reachable, so this option cannot be enabled.");
|
274 |
+
} else {
|
275 |
+
alert("Authentication failure! Please try again");
|
276 |
+
}
|
277 |
+
|
278 |
+
} else {
|
279 |
+
$(".wple-www").addClass("active");
|
280 |
+
}
|
281 |
+
}
|
282 |
+
});
|
283 |
+
|
284 |
+
|
285 |
+
} else {
|
286 |
+
$(".wple-www").removeClass("active");
|
287 |
+
}
|
288 |
+
});
|
289 |
+
|
290 |
+
$(".single-wildcard-switch").change(function () {
|
291 |
+
if ($(this).is(":checked")) {
|
292 |
+
$(".single-genform").fadeOut('fast');
|
293 |
+
$(".wildcard-genform").fadeIn('fast');
|
294 |
+
$(".wple-wc").addClass("active");
|
295 |
+
} else {
|
296 |
+
$(".wildcard-genform").fadeOut('fast');
|
297 |
+
$(".single-genform").fadeIn('fast');
|
298 |
+
$(".wple-wc").removeClass("active");
|
299 |
+
}
|
300 |
+
});
|
301 |
+
|
302 |
+
$(".initplan-switch").change(function () {
|
303 |
+
if ($(this).is(":checked")) {
|
304 |
+
$(".wplepricingcol.proplan").removeClass("hiddenplan");
|
305 |
+
$(".wplepricingcol.firewallplan").addClass("hiddenplan");
|
306 |
+
} else {
|
307 |
+
$(".wplepricingcol.proplan").addClass("hiddenplan");
|
308 |
+
$(".wplepricingcol.firewallplan").removeClass("hiddenplan");
|
309 |
+
}
|
310 |
+
});
|
311 |
+
|
312 |
+
jQuery(".wple-scan").click(function () {
|
313 |
+
var $button = $(this);
|
314 |
+
$(".wple-frameholder").html('');
|
315 |
+
$(this).text('SCANNING').attr("disabled", "disabled");
|
316 |
+
|
317 |
+
jQuery.ajax({
|
318 |
+
method: "POST",
|
319 |
+
url: SCAN.adminajax,
|
320 |
+
dataType: "html",
|
321 |
+
data: {
|
322 |
+
action: 'wple_start_scanner',
|
323 |
+
nc: $button.attr("data-nc"),
|
324 |
+
},
|
325 |
+
beforeSend: function () {
|
326 |
+
$("#wple-scanner-iframe").css("height", "510px");
|
327 |
+
|
328 |
+
var frm = document.createElement("iframe");
|
329 |
+
|
330 |
+
frm.src = SCAN.base;
|
331 |
+
frm.width = 500;
|
332 |
+
frm.height = 500;
|
333 |
+
frm.scrolling = 'no';
|
334 |
+
document.getElementsByClassName("wple-frameholder")[0].appendChild(frm);
|
335 |
+
},
|
336 |
+
error: function () {
|
337 |
+
alert("Request failed! Please try again.");
|
338 |
+
$button.text('SCAN').removeAttr("disabled");
|
339 |
+
$(".wple-frameholder").slideUp('fast');
|
340 |
+
},
|
341 |
+
success: function (response) {
|
342 |
+
|
343 |
+
if (response == 'nossl') {
|
344 |
+
$button.text('SCAN').removeAttr("disabled");
|
345 |
+
alert("Valid SSL Certificate could not be detected on your site! Please install SSL Certificate & force HTTPS before checking for mixed content issues.");
|
346 |
+
return false;
|
347 |
+
}
|
348 |
+
|
349 |
+
$(".wple-scanbar").css("animation", "none").text("Populating Mixed Content Stats! Please wait...").addClass("complete");
|
350 |
+
|
351 |
+
if (response == 'success') {
|
352 |
+
$(".wple-scan").text('COMPLETED');
|
353 |
+
$(".wple-scanbar").text("All good! Mixed content issues not found.").addClass("success");
|
354 |
+
$(".wple-frameholder").slideUp('fast');
|
355 |
+
return false;
|
356 |
+
}
|
357 |
+
|
358 |
+
$("#wple-scanner-iframe").fadeOut('fast');
|
359 |
+
$("#wple-scanresults").html(response);
|
360 |
+
$(".wple-scan").text('COMPLETED');
|
361 |
+
|
362 |
+
$('.wple-tooltip').each(function () {
|
363 |
+
var $this = $(this);
|
364 |
+
|
365 |
+
tippy('.wple-tooltip:not(.bottom)', {
|
366 |
+
//content: $this.attr('data-content'),
|
367 |
+
placement: 'top',
|
368 |
+
onShow(instance) {
|
369 |
+
instance.popper.hidden = instance.reference.dataset.tippy ? false : true;
|
370 |
+
instance.setContent(instance.reference.dataset.tippy);
|
371 |
+
}
|
372 |
+
//arrow: false
|
373 |
+
});
|
374 |
+
});
|
375 |
+
|
376 |
+
}
|
377 |
+
});
|
378 |
+
|
379 |
+
});
|
380 |
+
|
381 |
+
/**
|
382 |
+
* v5.2.6
|
383 |
+
*/
|
384 |
+
// var handler = FS.Checkout.configure({
|
385 |
+
// plugin_id: '5090',
|
386 |
+
// plan_id: '10643',
|
387 |
+
// public_key: 'pk_f6a07c106bf4ef064d9ac4b989e02',
|
388 |
+
// image: 'https://s3-us-west-2.amazonaws.com/freemius/plugins/5090/icons/766cb1e9dfd1b9436c3fb2c489a667ea.png'
|
389 |
+
// });
|
390 |
+
|
391 |
+
// $('#upgradetocdn').on('click', function (e) {
|
392 |
+
// handler.open({
|
393 |
+
// name: 'WP Encryption',
|
394 |
+
// licenses: 1,
|
395 |
+
// // You can consume the response for after purchase logic.
|
396 |
+
// purchaseCompleted: function (response) {
|
397 |
+
// // The logic here will be executed immediately after the purchase confirmation. // alert(response.user.email);
|
398 |
+
// },
|
399 |
+
// success: function (response) {
|
400 |
+
// // The logic here will be executed after the customer closes the checkout, after a successful purchase. // alert(response.user.email);
|
401 |
+
// }
|
402 |
+
// });
|
403 |
+
// e.preventDefault();
|
404 |
+
// });
|
405 |
+
|
406 |
+
$(".have-root-ssh").click(function () {
|
407 |
+
$(this).siblings().removeClass("active");
|
408 |
+
$(this).addClass("active");
|
409 |
+
|
410 |
+
$(".rootssh-check").fadeOut('fast');
|
411 |
+
$(".havessh").fadeIn("fast");
|
412 |
+
});
|
413 |
+
|
414 |
+
$(".no-root-ssh").click(function () {
|
415 |
+
$(this).siblings().removeClass("active");
|
416 |
+
$(this).addClass("active");
|
417 |
+
|
418 |
+
$(".rootssh-check").fadeOut('fast');
|
419 |
+
$(".nossh").fadeIn("fast");
|
420 |
+
});
|
421 |
+
|
422 |
+
$(".check-root-ssh li").click(function () {
|
423 |
+
$(".nocp-ssl-validation").show();
|
424 |
+
});
|
425 |
+
|
426 |
+
$("#validate-nocp-ssl").click(function () {
|
427 |
+
var $this = $(this);
|
428 |
+
|
429 |
+
jQuery.ajax({
|
430 |
+
method: "GET",
|
431 |
+
url: ajaxurl,
|
432 |
+
dataType: "text",
|
433 |
+
data: {
|
434 |
+
action: 'wple_validate_ssl'
|
435 |
+
},
|
436 |
+
beforeSend: function () {
|
437 |
+
$this.find("span").show();
|
438 |
+
$(".wple-validate-nossl").hide();
|
439 |
+
},
|
440 |
+
error: function () {
|
441 |
+
$this.find("span").hide();
|
442 |
+
alert("Could not validate SSL! Please try later.");
|
443 |
+
},
|
444 |
+
success: function (response) {
|
445 |
+
$this.find("span").hide();
|
446 |
+
|
447 |
+
if (response == 1) {
|
448 |
+
var currenthref = window.location.href;
|
449 |
+
window.location.href = currenthref.substr(0, currenthref.indexOf('&')) + "&success=1";
|
450 |
+
return false;
|
451 |
+
} else {
|
452 |
+
$(".wple-validate-nossl").fadeIn("fast");
|
453 |
+
}
|
454 |
+
}
|
455 |
+
});
|
456 |
+
});
|
457 |
+
|
458 |
+
$(".email-certs-switch,.disable-spmode-switch").change(function () {
|
459 |
+
var $this = $(this);
|
460 |
+
|
461 |
+
jQuery.ajax({
|
462 |
+
method: "POST",
|
463 |
+
url: ajaxurl,
|
464 |
+
dataType: "text",
|
465 |
+
data: {
|
466 |
+
action: 'wple_email_certs',
|
467 |
+
emailcert: $(".email-certs-switch").is(":checked"),
|
468 |
+
spmode: $(".disable-spmode-switch").is(":checked"),
|
469 |
+
nc: $(".download-certs").attr("data-update")
|
470 |
+
},
|
471 |
+
beforeSend: function () {},
|
472 |
+
error: function () {
|
473 |
+
alert("Failed to save opt! Please try again");
|
474 |
+
},
|
475 |
+
success: function (response) {
|
476 |
+
|
477 |
+
if (response == 'failed') {
|
478 |
+
alert("Couldn't save your settings! Please re-try.");
|
479 |
+
} else {
|
480 |
+
alert("Settings Saved!");
|
481 |
+
}
|
482 |
+
}
|
483 |
+
});
|
484 |
+
});
|
485 |
+
|
486 |
+
$(".wple-did-review,.wple-later-review").click(function (e) {
|
487 |
+
var $this = $(this);
|
488 |
+
e.preventDefault();
|
489 |
+
|
490 |
+
jQuery.ajax({
|
491 |
+
method: "POST",
|
492 |
+
url: ajaxurl,
|
493 |
+
dataType: "text",
|
494 |
+
data: {
|
495 |
+
action: 'wple_review_notice',
|
496 |
+
nc: $this.attr("data-nc"),
|
497 |
+
choice: $this.attr("data-action")
|
498 |
+
},
|
499 |
+
beforeSend: function () {},
|
500 |
+
error: function () {
|
501 |
+
alert("Failed to save! Please try again");
|
502 |
+
},
|
503 |
+
success: function (response) {
|
504 |
+
$(".wple-admin-review").fadeOut('slow');
|
505 |
+
}
|
506 |
+
});
|
507 |
+
});
|
508 |
+
|
509 |
+
$(".wple-mx-ignore").click(function (e) {
|
510 |
+
var $this = $(this);
|
511 |
+
e.preventDefault();
|
512 |
+
|
513 |
+
jQuery.ajax({
|
514 |
+
method: "POST",
|
515 |
+
url: ajaxurl,
|
516 |
+
dataType: "text",
|
517 |
+
data: {
|
518 |
+
action: 'wple_mxerror_ignore'
|
519 |
+
},
|
520 |
+
beforeSend: function () {},
|
521 |
+
error: function () {
|
522 |
+
//alert("Failed to save! Please try again");
|
523 |
+
},
|
524 |
+
success: function (response) {
|
525 |
+
$(".wple-mx-prom").fadeOut('slow');
|
526 |
+
}
|
527 |
+
});
|
528 |
+
});
|
529 |
+
|
530 |
+
function copycert(elem) {
|
531 |
+
var element = document.querySelector(elem);
|
532 |
+
if (typeof element !== 'undefined') {
|
533 |
+
element.select();
|
534 |
+
element.setSelectionRange(0, 9999999);
|
535 |
+
return document.execCommand("copy");
|
536 |
+
} else {
|
537 |
+
return false;
|
538 |
+
}
|
539 |
+
}
|
540 |
+
|
541 |
+
$(".copycert").click(function () {
|
542 |
+
|
543 |
+
var $this = $(this);
|
544 |
+
var ftype = $this.attr("data-type");
|
545 |
+
var txtarea = $(".crt-content textarea");
|
546 |
+
|
547 |
+
jQuery.ajax({
|
548 |
+
method: "GET",
|
549 |
+
url: ajaxurl,
|
550 |
+
dataType: "text",
|
551 |
+
data: {
|
552 |
+
action: 'wple_getcert_for_copy',
|
553 |
+
nc: txtarea.attr("data-nc"),
|
554 |
+
gettype: ftype
|
555 |
+
},
|
556 |
+
beforeSend: function () {
|
557 |
+
txtarea.slideUp('fast');
|
558 |
+
},
|
559 |
+
error: function () {
|
560 |
+
alert("Something went wrong! Please try again");
|
561 |
+
},
|
562 |
+
success: function (response) {
|
563 |
+
txtarea.text(response).slideDown('fast');
|
564 |
+
$(".copied-success").fadeIn("fast").delay(2000).promise().done(function () {
|
565 |
+
$(".copied-success").fadeOut("fast");
|
566 |
+
});
|
567 |
+
copycert(".crt-content textarea");
|
568 |
+
}
|
569 |
+
});
|
570 |
+
|
571 |
+
});
|
572 |
+
|
573 |
+
/** 5.5.0 */
|
574 |
+
function colorSwitch($new_score) {
|
575 |
+
var $scorebar = $(".wple-scorebar span");
|
576 |
+
|
577 |
+
if ($new_score >= 30 && $new_score <= 70) {
|
578 |
+
$scorebar.css("background", "#e2d754");
|
579 |
+
} else if ($new_score > 70) {
|
580 |
+
$scorebar.css("background", "#67d467");
|
581 |
+
} else {
|
582 |
+
$scorebar.css("background", "#ff5252");
|
583 |
+
}
|
584 |
+
}
|
585 |
+
|
586 |
+
$(".wple-setting").click(function () {
|
587 |
+
var $this = $(this);
|
588 |
+
var $opt = $this.attr("data-opt");
|
589 |
+
var $val = 0;
|
590 |
+
|
591 |
+
if ($this.is(":checked")) {
|
592 |
+
$val = 1;
|
593 |
+
}
|
594 |
+
|
595 |
+
jQuery.ajax({
|
596 |
+
method: "POST",
|
597 |
+
url: ajaxurl,
|
598 |
+
dataType: "text",
|
599 |
+
data: {
|
600 |
+
action: 'wple_update_settings',
|
601 |
+
opt: $opt,
|
602 |
+
nc: $(".wple-ssl-settings").attr("data-update"),
|
603 |
+
val: $val
|
604 |
+
},
|
605 |
+
beforeSend: function () {
|
606 |
+
$("li.wple-setting-error").fadeOut('fast');
|
607 |
+
},
|
608 |
+
error: function () {
|
609 |
+
alert("Could not update setting! Please try again.");
|
610 |
+
},
|
611 |
+
success: function (response) {
|
612 |
+
var $scorebar = $(".wple-scorebar span");
|
613 |
+
var $existing_score = $scorebar.attr("data-width");
|
614 |
+
var $new_score;
|
615 |
+
|
616 |
+
if (response > 0) {
|
617 |
+
$new_score = parseInt($existing_score) + 10;
|
618 |
+
|
619 |
+
$scorebar.animate({
|
620 |
+
width: $new_score + "%"
|
621 |
+
});
|
622 |
+
|
623 |
+
$scorebar.attr("data-width", $new_score);
|
624 |
+
|
625 |
+
$("li." + $opt + " span").removeClass("wple-no").addClass("wple-yes").text("Yes");
|
626 |
+
colorSwitch($new_score);
|
627 |
+
} else if (response == 1) {
|
628 |
+
|
629 |
+
$("li.wple-setting-error").fadeIn('fast');
|
630 |
+
|
631 |
+
} else if (response < 0) {
|
632 |
+
|
633 |
+
$new_score = parseInt($existing_score) - 10;
|
634 |
+
|
635 |
+
$scorebar.animate({
|
636 |
+
width: $new_score + "%"
|
637 |
+
});
|
638 |
+
|
639 |
+
$scorebar.attr("data-width", $new_score);
|
640 |
+
|
641 |
+
$("li." + $opt + " span").removeClass("wple-yes").addClass("wple-no").text("No");
|
642 |
+
colorSwitch($new_score);
|
643 |
+
} else if (response == 'htaccessnotwritable') {
|
644 |
+
alert(".htaccess file not writable! Please change .htaccess file permission to 644 in order to implement security headers.")
|
645 |
+
$this.removeAttr("checked");
|
646 |
+
}
|
647 |
+
|
648 |
+
$(".wple-score").text($new_score);
|
649 |
+
|
650 |
+
}
|
651 |
+
});
|
652 |
+
|
653 |
+
});
|
654 |
+
|
655 |
+
|
656 |
+
})(jQuery);
|
admin/js/popper.min.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Copyright (C) Federico Zivolo 2019
|
3 |
+
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
|
4 |
+
*/(function(e,t){'object'==typeof exports&&'undefined'!=typeof module?module.exports=t():'function'==typeof define&&define.amd?define(t):e.Popper=t()})(this,function(){'use strict';function e(e){return e&&'[object Function]'==={}.toString.call(e)}function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}function o(e){return'HTML'===e.nodeName?e:e.parentNode||e.host}function n(e){if(!e)return document.body;switch(e.nodeName){case'HTML':case'BODY':return e.ownerDocument.body;case'#document':return e.body;}var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return /(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}function i(e){return e&&e.referenceNode?e.referenceNode:e}function r(e){return 11===e?re:10===e?pe:re||pe}function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent||null;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&'BODY'!==i&&'HTML'!==i?-1!==['TH','TD','TABLE'].indexOf(n.nodeName)&&'static'===t(n,'position')?p(n):n:e?e.ownerDocument.documentElement:document.documentElement}function s(e){var t=e.nodeName;return'BODY'!==t&&('HTML'===t||p(e.firstElementChild)===e)}function d(e){return null===e.parentNode?e:d(e.parentNode)}function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if(e!==l&&t!==l||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}function l(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:'top',o='top'===t?'scrollTop':'scrollLeft',n=e.nodeName;if('BODY'===n||'HTML'===n){var i=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||i;return r[o]}return e[o]}function f(e,t){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],n=l(t,'top'),i=l(t,'left'),r=o?-1:1;return e.top+=n*r,e.bottom+=n*r,e.left+=i*r,e.right+=i*r,e}function m(e,t){var o='x'===t?'Left':'Top',n='Left'==o?'Right':'Bottom';return parseFloat(e['border'+o+'Width'],10)+parseFloat(e['border'+n+'Width'],10)}function h(e,t,o,n){return ee(t['offset'+e],t['scroll'+e],o['client'+e],o['offset'+e],o['scroll'+e],r(10)?parseInt(o['offset'+e])+parseInt(n['margin'+('Height'===e?'Top':'Left')])+parseInt(n['margin'+('Height'===e?'Bottom':'Right')]):0)}function c(e){var t=e.body,o=e.documentElement,n=r(10)&&getComputedStyle(o);return{height:h('Height',t,o,n),width:h('Width',t,o,n)}}function g(e){return le({},e,{right:e.left+e.width,bottom:e.top+e.height})}function u(e){var o={};try{if(r(10)){o=e.getBoundingClientRect();var n=l(e,'top'),i=l(e,'left');o.top+=n,o.left+=i,o.bottom+=n,o.right+=i}else o=e.getBoundingClientRect()}catch(t){}var p={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},s='HTML'===e.nodeName?c(e.ownerDocument):{},d=s.width||e.clientWidth||p.width,a=s.height||e.clientHeight||p.height,f=e.offsetWidth-d,h=e.offsetHeight-a;if(f||h){var u=t(e);f-=m(u,'x'),h-=m(u,'y'),p.width-=f,p.height-=h}return g(p)}function b(e,o){var i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],p=r(10),s='HTML'===o.nodeName,d=u(e),a=u(o),l=n(e),m=t(o),h=parseFloat(m.borderTopWidth,10),c=parseFloat(m.borderLeftWidth,10);i&&s&&(a.top=ee(a.top,0),a.left=ee(a.left,0));var b=g({top:d.top-a.top-h,left:d.left-a.left-c,width:d.width,height:d.height});if(b.marginTop=0,b.marginLeft=0,!p&&s){var w=parseFloat(m.marginTop,10),y=parseFloat(m.marginLeft,10);b.top-=h-w,b.bottom-=h-w,b.left-=c-y,b.right-=c-y,b.marginTop=w,b.marginLeft=y}return(p&&!i?o.contains(l):o===l&&'BODY'!==l.nodeName)&&(b=f(b,o)),b}function w(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=e.ownerDocument.documentElement,n=b(e,o),i=ee(o.clientWidth,window.innerWidth||0),r=ee(o.clientHeight,window.innerHeight||0),p=t?0:l(o),s=t?0:l(o,'left'),d={top:p-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:r};return g(d)}function y(e){var n=e.nodeName;if('BODY'===n||'HTML'===n)return!1;if('fixed'===t(e,'position'))return!0;var i=o(e);return!!i&&y(i)}function E(e){if(!e||!e.parentElement||r())return document.documentElement;for(var o=e.parentElement;o&&'none'===t(o,'transform');)o=o.parentElement;return o||document.documentElement}function v(e,t,r,p){var s=4<arguments.length&&void 0!==arguments[4]&&arguments[4],d={top:0,left:0},l=s?E(e):a(e,i(t));if('viewport'===p)d=w(l,s);else{var f;'scrollParent'===p?(f=n(o(t)),'BODY'===f.nodeName&&(f=e.ownerDocument.documentElement)):'window'===p?f=e.ownerDocument.documentElement:f=p;var m=b(f,l,s);if('HTML'===f.nodeName&&!y(l)){var h=c(e.ownerDocument),g=h.height,u=h.width;d.top+=m.top-m.marginTop,d.bottom=g+m.top,d.left+=m.left-m.marginLeft,d.right=u+m.left}else d=m}r=r||0;var v='number'==typeof r;return d.left+=v?r:r.left||0,d.top+=v?r:r.top||0,d.right-=v?r:r.right||0,d.bottom-=v?r:r.bottom||0,d}function x(e){var t=e.width,o=e.height;return t*o}function O(e,t,o,n,i){var r=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf('auto'))return e;var p=v(o,n,r,i),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return le({key:e},s[e],{area:x(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,n=e.height;return t>=o.clientWidth&&n>=o.clientHeight}),l=0<a.length?a[0].key:d[0].key,f=e.split('-')[1];return l+(f?'-'+f:'')}function L(e,t,o){var n=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null,r=n?E(t):a(t,i(o));return b(o,r,n)}function S(e){var t=e.ownerDocument.defaultView,o=t.getComputedStyle(e),n=parseFloat(o.marginTop||0)+parseFloat(o.marginBottom||0),i=parseFloat(o.marginLeft||0)+parseFloat(o.marginRight||0),r={width:e.offsetWidth+i,height:e.offsetHeight+n};return r}function T(e){var t={left:'right',right:'left',bottom:'top',top:'bottom'};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function C(e,t,o){o=o.split('-')[0];var n=S(e),i={width:n.width,height:n.height},r=-1!==['right','left'].indexOf(o),p=r?'top':'left',s=r?'left':'top',d=r?'height':'width',a=r?'width':'height';return i[p]=t[p]+t[d]/2-n[d]/2,i[s]=o===s?t[s]-n[a]:t[T(s)],i}function D(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function N(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var n=D(e,function(e){return e[t]===o});return e.indexOf(n)}function P(t,o,n){var i=void 0===n?t:t.slice(0,N(t,'name',n));return i.forEach(function(t){t['function']&&console.warn('`modifier.function` is deprecated, use `modifier.fn`!');var n=t['function']||t.fn;t.enabled&&e(n)&&(o.offsets.popper=g(o.offsets.popper),o.offsets.reference=g(o.offsets.reference),o=n(o,t))}),o}function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=O(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=C(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?'fixed':'absolute',e=P(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function W(e,t){return e.some(function(e){var o=e.name,n=e.enabled;return n&&o===t})}function B(e){for(var t=[!1,'ms','Webkit','Moz','O'],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],r=i?''+i+o:e;if('undefined'!=typeof document.body.style[r])return r}return null}function H(){return this.state.isDestroyed=!0,W(this.modifiers,'applyStyle')&&(this.popper.removeAttribute('x-placement'),this.popper.style.position='',this.popper.style.top='',this.popper.style.left='',this.popper.style.right='',this.popper.style.bottom='',this.popper.style.willChange='',this.popper.style[B('transform')]=''),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function A(e){var t=e.ownerDocument;return t?t.defaultView:window}function M(e,t,o,i){var r='BODY'===e.nodeName,p=r?e.ownerDocument.defaultView:e;p.addEventListener(t,o,{passive:!0}),r||M(n(p.parentNode),t,o,i),i.push(p)}function F(e,t,o,i){o.updateBound=i,A(e).addEventListener('resize',o.updateBound,{passive:!0});var r=n(e);return M(r,'scroll',o.updateBound,o.scrollParents),o.scrollElement=r,o.eventsEnabled=!0,o}function I(){this.state.eventsEnabled||(this.state=F(this.reference,this.options,this.state,this.scheduleUpdate))}function R(e,t){return A(e).removeEventListener('resize',t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener('scroll',t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function U(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=R(this.reference,this.state))}function Y(e){return''!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function V(e,t){Object.keys(t).forEach(function(o){var n='';-1!==['width','height','top','right','bottom','left'].indexOf(o)&&Y(t[o])&&(n='px'),e.style[o]=t[o]+n})}function j(e,t){Object.keys(t).forEach(function(o){var n=t[o];!1===n?e.removeAttribute(o):e.setAttribute(o,t[o])})}function q(e,t){var o=e.offsets,n=o.popper,i=o.reference,r=$,p=function(e){return e},s=r(i.width),d=r(n.width),a=-1!==['left','right'].indexOf(e.placement),l=-1!==e.placement.indexOf('-'),f=t?a||l||s%2==d%2?r:Z:p,m=t?r:p;return{left:f(1==s%2&&1==d%2&&!l&&t?n.left-1:n.left),top:m(n.top),bottom:m(n.bottom),right:f(n.right)}}function K(e,t,o){var n=D(e,function(e){var o=e.name;return o===t}),i=!!n&&e.some(function(e){return e.name===o&&e.enabled&&e.order<n.order});if(!i){var r='`'+t+'`';console.warn('`'+o+'`'+' modifier is required by '+r+' modifier in order to work, be sure to include it before '+r+'!')}return i}function z(e){return'end'===e?'start':'start'===e?'end':e}function G(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],o=he.indexOf(e),n=he.slice(o+1).concat(he.slice(0,o));return t?n.reverse():n}function _(e,t,o,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+i[1],p=i[2];if(!r)return e;if(0===p.indexOf('%')){var s;switch(p){case'%p':s=o;break;case'%':case'%r':default:s=n;}var d=g(s);return d[t]/100*r}if('vh'===p||'vw'===p){var a;return a='vh'===p?ee(document.documentElement.clientHeight,window.innerHeight||0):ee(document.documentElement.clientWidth,window.innerWidth||0),a/100*r}return r}function X(e,t,o,n){var i=[0,0],r=-1!==['right','left'].indexOf(n),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(D(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(',')&&console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.');var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return a=a.map(function(e,n){var i=(1===n?!r:r)?'height':'width',p=!1;return e.reduce(function(e,t){return''===e[e.length-1]&&-1!==['+','-'].indexOf(t)?(e[e.length-1]=t,p=!0,e):p?(e[e.length-1]+=t,p=!1,e):e.concat(t)},[]).map(function(e){return _(e,i,t,o)})}),a.forEach(function(e,t){e.forEach(function(o,n){Y(o)&&(i[t]+=o*('-'===e[n-1]?-1:1))})}),i}function J(e,t){var o,n=t.offset,i=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=i.split('-')[0];return o=Y(+n)?[+n,0]:X(n,p,s,d),'left'===d?(p.top+=o[0],p.left-=o[1]):'right'===d?(p.top+=o[0],p.left+=o[1]):'top'===d?(p.left+=o[0],p.top-=o[1]):'bottom'===d&&(p.left+=o[0],p.top+=o[1]),e.popper=p,e}var Q=Math.min,Z=Math.floor,$=Math.round,ee=Math.max,te='undefined'!=typeof window&&'undefined'!=typeof document&&'undefined'!=typeof navigator,oe=function(){for(var e=['Edge','Trident','Firefox'],t=0;t<e.length;t+=1)if(te&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0}(),ne=te&&window.Promise,ie=ne?function(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}:function(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},oe))}},re=te&&!!(window.MSInputMethodContext&&document.documentMode),pe=te&&/MSIE 10/.test(navigator.userAgent),se=function(e,t){if(!(e instanceof t))throw new TypeError('Cannot call a class as a function')},de=function(){function e(e,t){for(var o,n=0;n<t.length;n++)o=t[n],o.enumerable=o.enumerable||!1,o.configurable=!0,'value'in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),ae=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},le=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var n in t=arguments[o],t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},fe=te&&/Firefox/i.test(navigator.userAgent),me=['auto-start','auto','auto-end','top-start','top','top-end','right-start','right','right-end','bottom-end','bottom','bottom-start','left-end','left','left-start'],he=me.slice(3),ce={FLIP:'flip',CLOCKWISE:'clockwise',COUNTERCLOCKWISE:'counterclockwise'},ge=function(){function t(o,n){var i=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};se(this,t),this.scheduleUpdate=function(){return requestAnimationFrame(i.update)},this.update=ie(this.update.bind(this)),this.options=le({},t.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=o&&o.jquery?o[0]:o,this.popper=n&&n.jquery?n[0]:n,this.options.modifiers={},Object.keys(le({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){i.options.modifiers[e]=le({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return le({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),this.state.eventsEnabled=p}return de(t,[{key:'update',value:function(){return k.call(this)}},{key:'destroy',value:function(){return H.call(this)}},{key:'enableEventListeners',value:function(){return I.call(this)}},{key:'disableEventListeners',value:function(){return U.call(this)}}]),t}();return ge.Utils=('undefined'==typeof window?global:window).PopperUtils,ge.placements=me,ge.Defaults={placement:'bottom',positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split('-')[0],n=t.split('-')[1];if(n){var i=e.offsets,r=i.reference,p=i.popper,s=-1!==['bottom','top'].indexOf(o),d=s?'left':'top',a=s?'width':'height',l={start:ae({},d,r[d]),end:ae({},d,r[d]+r[a]-p[a])};e.offsets.popper=le({},p,l[n])}return e}},offset:{order:200,enabled:!0,fn:J,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||p(e.instance.popper);e.instance.reference===o&&(o=p(o));var n=B('transform'),i=e.instance.popper.style,r=i.top,s=i.left,d=i[n];i.top='',i.left='',i[n]='';var a=v(e.instance.popper,e.instance.reference,t.padding,o,e.positionFixed);i.top=r,i.left=s,i[n]=d,t.boundaries=a;var l=t.priority,f=e.offsets.popper,m={primary:function(e){var o=f[e];return f[e]<a[e]&&!t.escapeWithReference&&(o=ee(f[e],a[e])),ae({},e,o)},secondary:function(e){var o='right'===e?'left':'top',n=f[o];return f[e]>a[e]&&!t.escapeWithReference&&(n=Q(f[o],a[e]-('right'===e?f.width:f.height))),ae({},o,n)}};return l.forEach(function(e){var t=-1===['left','top'].indexOf(e)?'secondary':'primary';f=le({},f,m[t](e))}),e.offsets.popper=f,e},priority:['left','right','top','bottom'],padding:5,boundariesElement:'scrollParent'},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split('-')[0],r=Z,p=-1!==['top','bottom'].indexOf(i),s=p?'right':'bottom',d=p?'left':'top',a=p?'width':'height';return o[s]<r(n[d])&&(e.offsets.popper[d]=r(n[d])-o[a]),o[d]>r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!K(e.instance.modifiers,'arrow','keepTogether'))return e;var i=o.element;if('string'==typeof i){if(i=e.instance.popper.querySelector(i),!i)return e;}else if(!e.instance.popper.contains(i))return console.warn('WARNING: `arrow.element` must be child of its popper element!'),e;var r=e.placement.split('-')[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==['left','right'].indexOf(r),l=a?'height':'width',f=a?'Top':'Left',m=f.toLowerCase(),h=a?'left':'top',c=a?'bottom':'right',u=S(i)[l];d[c]-u<s[m]&&(e.offsets.popper[m]-=s[m]-(d[c]-u)),d[m]+u>s[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),e.offsets.popper=g(e.offsets.popper);var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w['margin'+f],10),E=parseFloat(w['border'+f+'Width'],10),v=b-e.offsets.popper[m]-y-E;return v=ee(Q(s[l]-u,v),0),e.arrowElement=i,e.offsets.arrow=(n={},ae(n,m,$(v)),ae(n,h,''),n),e},element:'[x-arrow]'},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,'inner'))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split('-')[0],i=T(n),r=e.placement.split('-')[1]||'',p=[];switch(t.behavior){case ce.FLIP:p=[n,i];break;case ce.CLOCKWISE:p=G(n);break;case ce.COUNTERCLOCKWISE:p=G(n,!0);break;default:p=t.behavior;}return p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;n=e.placement.split('-')[0],i=T(n);var a=e.offsets.popper,l=e.offsets.reference,f=Z,m='left'===n&&f(a.right)>f(l.left)||'right'===n&&f(a.left)<f(l.right)||'top'===n&&f(a.bottom)>f(l.top)||'bottom'===n&&f(a.top)<f(l.bottom),h=f(a.left)<f(o.left),c=f(a.right)>f(o.right),g=f(a.top)<f(o.top),u=f(a.bottom)>f(o.bottom),b='left'===n&&h||'right'===n&&c||'top'===n&&g||'bottom'===n&&u,w=-1!==['top','bottom'].indexOf(n),y=!!t.flipVariations&&(w&&'start'===r&&h||w&&'end'===r&&c||!w&&'start'===r&&g||!w&&'end'===r&&u),E=!!t.flipVariationsByContent&&(w&&'start'===r&&c||w&&'end'===r&&h||!w&&'start'===r&&u||!w&&'end'===r&&g),v=y||E;(m||b||v)&&(e.flipped=!0,(m||b)&&(n=p[d+1]),v&&(r=z(r)),e.placement=n+(r?'-'+r:''),e.offsets.popper=le({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement)),e=P(e.instance.modifiers,e,'flip'))}),e},behavior:'flip',padding:5,boundariesElement:'viewport',flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split('-')[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==['left','right'].indexOf(o),s=-1===['top','left'].indexOf(o);return i[p?'left':'top']=r[o]-(s?i[p?'width':'height']:0),e.placement=T(t),e.offsets.popper=g(i),e}},hide:{order:800,enabled:!0,fn:function(e){if(!K(e.instance.modifiers,'hide','preventOverflow'))return e;var t=e.offsets.reference,o=D(e.instance.modifiers,function(e){return'preventOverflow'===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;e.hide=!0,e.attributes['x-out-of-boundaries']=''}else{if(!1===e.hide)return e;e.hide=!1,e.attributes['x-out-of-boundaries']=!1}return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,n=t.y,i=e.offsets.popper,r=D(e.instance.modifiers,function(e){return'applyStyle'===e.name}).gpuAcceleration;void 0!==r&&console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!');var s,d,a=void 0===r?t.gpuAcceleration:r,l=p(e.instance.popper),f=u(l),m={position:i.position},h=q(e,2>window.devicePixelRatio||!fe),c='bottom'===o?'top':'bottom',g='right'===n?'left':'right',b=B('transform');if(d='bottom'==c?'HTML'===l.nodeName?-l.clientHeight+h.bottom:-f.height+h.bottom:h.top,s='right'==g?'HTML'===l.nodeName?-l.clientWidth+h.right:-f.width+h.right:h.left,a&&b)m[b]='translate3d('+s+'px, '+d+'px, 0)',m[c]=0,m[g]=0,m.willChange='transform';else{var w='bottom'==c?-1:1,y='right'==g?-1:1;m[c]=d*w,m[g]=s*y,m.willChange=c+', '+g}var E={"x-placement":e.placement};return e.attributes=le({},E,e.attributes),e.styles=le({},m,e.styles),e.arrowStyles=le({},e.offsets.arrow,e.arrowStyles),e},gpuAcceleration:!0,x:'bottom',y:'right'},applyStyle:{order:900,enabled:!0,fn:function(e){return V(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&V(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,n,i){var r=L(i,t,e,o.positionFixed),p=O(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute('x-placement',p),V(t,{position:o.positionFixed?'fixed':'absolute'}),o},gpuAcceleration:void 0}}},ge});
|
5 |
+
//# sourceMappingURL=popper.min.js.map
|
admin/js/tippy-bundle.iife.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
var tippy=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;function e(){return(e=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var n={passive:!0},r="tippy-iOS",i="tippy-popper",o="tippy-tooltip",a="tippy-content",p="tippy-backdrop",u="tippy-arrow",s="tippy-svg-arrow",c="."+i,l="."+o,f="."+a,d="."+u,v="."+s;function m(t,e){t.innerHTML=e}function h(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function g(t,e){return{}.hasOwnProperty.call(t,e)}function b(t){return A(t)?[t]:function(t){return E(t,"NodeList")}(t)?S(t):Array.isArray(t)?t:S(document.querySelectorAll(t))}function y(t,e,n){if(Array.isArray(t)){var r=t[e];return null==r?Array.isArray(n)?n[e]:n:r}return t}function w(t,e){return t&&t.modifiers&&t.modifiers[e]}function E(t,e){var n={}.toString.call(t);return 0===n.indexOf("[object")&&n.indexOf(e+"]")>-1}function A(t){return E(t,"Element")}function T(t){return E(t,"MouseEvent")}function x(t,e){return"function"==typeof t?t.apply(void 0,e):t}function C(t,e,n,r){t.filter(function(t){return t.name===e})[0][n]=r}function I(){return document.createElement("div")}function O(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function D(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function L(t,e){return 0===e?t:function(r){clearTimeout(n),n=setTimeout(function(){t(r)},e)};var n}function M(t,e,n){t&&t!==e&&t.apply(void 0,n)}function S(t){return[].slice.call(t)}function k(t,e){for(;t;){if(e(t))return t;t=t.parentElement}return null}function P(t,e){return t.indexOf(e)>-1}function V(t){return t.split(/\s+/).filter(Boolean)}function B(t,e){return void 0!==t?t:e}function U(t){return[].concat(t)}function H(t){var e=U(t)[0];return e&&e.ownerDocument||document}function N(t,e){-1===t.indexOf(e)&&t.push(e)}function z(t){return"number"==typeof t?t:parseFloat(t)}function R(t,e,n){void 0===e&&(e=5);var r={top:0,right:0,bottom:0,left:0};return Object.keys(r).reduce(function(r,i){return r[i]="number"==typeof e?e:e[i],t===i&&(r[i]="number"==typeof e?e+n:e[t]+n),r},r)}var q={isTouch:!1},F=0;function j(){q.isTouch||(q.isTouch=!0,window.performance&&document.addEventListener("mousemove",_))}function _(){var t=performance.now();t-F<20&&(q.isTouch=!1,document.removeEventListener("mousemove",_)),F=t}function W(){var t=document.activeElement;if(h(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var X="undefined"!=typeof window&&"undefined"!=typeof document,Y=X?navigator.userAgent:"",J=/MSIE |Trident\//.test(Y),G=/UCBrowser\//.test(Y),K=X&&/iPhone|iPad|iPod/.test(navigator.platform);function Q(t){var e=t&&K&&q.isTouch;document.body.classList[e?"add":"remove"](r)}var Z={allowHTML:!0,animateFill:!1,animation:"fade",appendTo:function(){return document.body},aria:"describedby",arrow:!0,boundary:"scrollParent",content:"",delay:0,distance:10,duration:[300,250],flip:!0,flipBehavior:"flip",flipOnUpdate:!1,followCursor:!1,hideOnClick:!0,ignoreAttributes:!1,inlinePositioning:!1,inertia:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,lazy:!0,maxWidth:350,multiple:!1,offset:0,onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},placement:"top",plugins:[],popperOptions:{},role:"tooltip",showOnCreate:!1,sticky:!1,theme:"",touch:!0,trigger:"mouseenter focus",triggerTarget:null,updateDuration:0,zIndex:9999},$=Object.keys(Z),tt=["arrow","boundary","distance","flip","flipBehavior","flipOnUpdate","offset","placement","popperOptions"];function et(t){return e({},t,{},t.plugins.reduce(function(e,n){var r=n.name,i=n.defaultValue;return r&&(e[r]=void 0!==t[r]?t[r]:i),e},{}))}function nt(t,n){var r=e({},n,{content:x(n.content,[t])},n.ignoreAttributes?{}:function(t,n){return(n?Object.keys(et(e({},Z,{plugins:n}))):$).reduce(function(e,n){var r=(t.getAttribute("data-tippy-"+n)||"").trim();if(!r)return e;if("content"===n)e[n]=r;else try{e[n]=JSON.parse(r)}catch(t){e[n]=r}return e},{})}(t,n.plugins));return r.interactive&&(r.aria=null),r}function rt(t){return t.split("-")[0]}function it(t){t.setAttribute("data-inertia","")}function ot(t){t.setAttribute("data-interactive","")}function at(t,e){if(A(e.content))m(t,""),t.appendChild(e.content);else if("function"!=typeof e.content){t[e.allowHTML?"innerHTML":"textContent"]=e.content}}function pt(t){return{tooltip:t.querySelector(l),content:t.querySelector(f),arrow:t.querySelector(d)||t.querySelector(v)}}function ut(t){var e=I();return!0===t?e.className=u:(e.className=s,A(t)?e.appendChild(t):m(e,t)),e}function st(t,e){var n=I();n.className=i,n.style.position="absolute",n.style.top="0",n.style.left="0";var r=I();r.className=o,r.id="tippy-"+t,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1"),ft(r,"add",e.theme);var p=I();return p.className=a,p.setAttribute("data-state","hidden"),e.interactive&&ot(r),e.arrow&&(r.setAttribute("data-arrow",""),r.appendChild(ut(e.arrow))),e.inertia&&it(r),at(p,e),r.appendChild(p),n.appendChild(r),ct(n,e,e),n}function ct(t,e,n){var r,i=pt(t),o=i.tooltip,a=i.content,p=i.arrow;t.style.zIndex=""+n.zIndex,o.setAttribute("data-animation",n.animation),o.style.maxWidth="number"==typeof(r=n.maxWidth)?r+"px":r,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),e.content!==n.content&&at(a,n),!e.arrow&&n.arrow?(o.appendChild(ut(n.arrow)),o.setAttribute("data-arrow","")):e.arrow&&!n.arrow?(o.removeChild(p),o.removeAttribute("data-arrow")):e.arrow!==n.arrow&&(o.removeChild(p),o.appendChild(ut(n.arrow))),!e.interactive&&n.interactive?ot(o):e.interactive&&!n.interactive&&function(t){t.removeAttribute("data-interactive")}(o),!e.inertia&&n.inertia?it(o):e.inertia&&!n.inertia&&function(t){t.removeAttribute("data-inertia")}(o),e.theme!==n.theme&&(ft(o,"remove",e.theme),ft(o,"add",n.theme))}function lt(t,e,n){var r=G&&void 0!==document.body.style.webkitTransition?"webkitTransitionEnd":"transitionend";t[e+"EventListener"](r,n)}function ft(t,e,n){V(n).forEach(function(n){t.classList[e](n+"-theme")})}var dt=1,vt=[],mt=[];function ht(r,i){var o,a,p,u=et(nt(r,i));if(!u.multiple&&r._tippy)return null;var s,l,f,d,v,m=!1,h=!1,b=0,E=[],A=L(Ot,u.interactiveDebounce),I=H(u.triggerTarget||r),F=dt++,j=st(F,u),_=pt(j),W=(v=u.plugins).filter(function(t,e){return v.indexOf(t)===e}),X=_.tooltip,Y=_.content,G=[X,Y],K={id:F,reference:r,popper:j,popperChildren:_,popperInstance:null,props:u,state:{currentPlacement:null,isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:W,clearDelayTimeouts:function(){clearTimeout(o),clearTimeout(a),cancelAnimationFrame(p)},setProps:function(t){if(K.state.isDestroyed)return;ft("onBeforeUpdate",[K,t]),Ct();var n=K.props,i=nt(r,e({},K.props,{},t,{ignoreAttributes:!0}));i.ignoreAttributes=B(t.ignoreAttributes,n.ignoreAttributes),K.props=i,xt(),n.interactiveDebounce!==i.interactiveDebounce&&(bt(),A=L(Ot,i.interactiveDebounce));ct(j,n,i),K.popperChildren=pt(j),n.triggerTarget&&!i.triggerTarget?U(n.triggerTarget).forEach(function(t){t.removeAttribute("aria-expanded")}):i.triggerTarget&&r.removeAttribute("aria-expanded");if(gt(),K.popperInstance)if(tt.some(function(e){return g(t,e)&&t[e]!==n[e]})){var o=K.popperInstance.reference;K.popperInstance.destroy(),St(),K.popperInstance.reference=o,K.state.isVisible&&K.popperInstance.enableEventListeners()}else K.popperInstance.update();ft("onAfterUpdate",[K,t])},setContent:function(t){K.setProps({content:t})},show:function(t){void 0===t&&(t=y(K.props.duration,0,Z.duration));var e=K.state.isVisible,n=K.state.isDestroyed,r=!K.state.isEnabled,i=q.isTouch&&!K.props.touch;if(e||n||r||i)return;if(at().hasAttribute("disabled"))return;K.popperInstance||St();if(ft("onShow",[K],!1),!1===K.props.onShow(K))return;wt(),j.style.visibility="visible",K.state.isVisible=!0,K.state.isMounted||O(G.concat(j),0);l=function(){K.state.isVisible&&(O([j],K.props.updateDuration),O(G,t),D(G,"visible"),ht(),gt(),N(mt,K),Q(!0),K.state.isMounted=!0,ft("onMount",[K]),function(t,e){At(t,e)}(t,function(){K.state.isShown=!0,ft("onShown",[K])}))},function(){b=0;var t,e=K.props.appendTo,n=at();t=K.props.interactive&&e===Z.appendTo||"parent"===e?n.parentNode:x(e,[n]);t.contains(j)||t.appendChild(j);C(K.popperInstance.modifiers,"flip","enabled",K.props.flip),K.popperInstance.enableEventListeners(),K.popperInstance.update()}()},hide:function(t){void 0===t&&(t=y(K.props.duration,1,Z.duration));var e=!K.state.isVisible&&!m,n=K.state.isDestroyed,r=!K.state.isEnabled&&!m;if(e||n||r)return;if(ft("onHide",[K],!1),!1===K.props.onHide(K)&&!m)return;Et(),j.style.visibility="hidden",K.state.isVisible=!1,K.state.isShown=!1,O(G,t),D(G,"hidden"),ht(),gt(),function(t,e){At(t,function(){!K.state.isVisible&&j.parentNode&&j.parentNode.contains(j)&&e()})}(t,function(){K.popperInstance.disableEventListeners(),K.popperInstance.options.placement=K.props.placement,j.parentNode.removeChild(j),0===(mt=mt.filter(function(t){return t!==K})).length&&Q(!1),K.state.isMounted=!1,ft("onHidden",[K])})},enable:function(){K.state.isEnabled=!0},disable:function(){K.hide(),K.state.isEnabled=!1},destroy:function(){if(K.state.isDestroyed)return;m=!0,K.clearDelayTimeouts(),K.hide(0),Ct(),delete r._tippy,K.popperInstance&&K.popperInstance.destroy();m=!1,K.state.isDestroyed=!0,ft("onDestroy",[K])}};r._tippy=K,j._tippy=K;var $=W.map(function(t){return t.fn(K)});return xt(),gt(),u.lazy||St(),ft("onCreate",[K]),u.showOnCreate&&Pt(),j.addEventListener("mouseenter",function(){K.props.interactive&&K.state.isVisible&&K.clearDelayTimeouts()}),j.addEventListener("mouseleave",function(){K.props.interactive&&P(K.props.trigger,"mouseenter")&&I.addEventListener("mousemove",A)}),K;function it(){var t=K.props.touch;return Array.isArray(t)?t:[t,0]}function ot(){return"hold"===it()[0]}function at(){return d||r}function ut(t){return K.state.isMounted&&!K.state.isVisible||q.isTouch||s&&"focus"===s.type?0:y(K.props.delay,t?0:1,Z.delay)}function ft(t,e,n){var r;(void 0===n&&(n=!0),$.forEach(function(n){g(n,t)&&n[t].apply(n,e)}),n)&&(r=K.props)[t].apply(r,e)}function ht(){var t=K.props.aria;if(t){var e="aria-"+t,n=X.id;U(K.props.triggerTarget||r).forEach(function(t){var r=t.getAttribute(e);if(K.state.isVisible)t.setAttribute(e,r?r+" "+n:n);else{var i=r&&r.replace(n,"").trim();i?t.setAttribute(e,i):t.removeAttribute(e)}})}}function gt(){U(K.props.triggerTarget||r).forEach(function(t){K.props.interactive?t.setAttribute("aria-expanded",K.state.isVisible&&t===at()?"true":"false"):t.removeAttribute("aria-expanded")})}function bt(){I.body.removeEventListener("mouseleave",Vt),I.removeEventListener("mousemove",A),vt=vt.filter(function(t){return t!==A})}function yt(t){if(!K.props.interactive||!j.contains(t.target)){if(at().contains(t.target)){if(q.isTouch)return;if(K.state.isVisible&&P(K.props.trigger,"click"))return}!0===K.props.hideOnClick&&(K.clearDelayTimeouts(),K.hide(),h=!0,setTimeout(function(){h=!1}),K.state.isMounted||Et())}}function wt(){I.addEventListener("mousedown",yt,!0)}function Et(){I.removeEventListener("mousedown",yt,!0)}function At(t,e){function n(t){t.target===X&&(lt(X,"remove",n),e())}if(0===t)return e();lt(X,"remove",f),lt(X,"add",n),f=n}function Tt(t,e,n){void 0===n&&(n=!1),U(K.props.triggerTarget||r).forEach(function(r){r.addEventListener(t,e,n),E.push({node:r,eventType:t,handler:e,options:n})})}function xt(){ot()&&(Tt("touchstart",It,n),Tt("touchend",Dt,n)),V(K.props.trigger).forEach(function(t){if("manual"!==t)switch(Tt(t,It),t){case"mouseenter":Tt("mouseleave",Dt);break;case"focus":Tt(J?"focusout":"blur",Lt)}})}function Ct(){E.forEach(function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)}),E=[]}function It(t){if(K.state.isEnabled&&!Mt(t)&&!h)if(s=t,d=t.currentTarget,gt(),!K.state.isVisible&&T(t)&&vt.forEach(function(e){return e(t)}),"click"===t.type&&!1!==K.props.hideOnClick&&K.state.isVisible)Vt(t);else{var e=it(),n=e[0],r=e[1];q.isTouch&&"hold"===n&&r?o=setTimeout(function(){Pt(t)},r):Pt(t)}}function Ot(t){k(t.target,function(t){return t===r||t===j})||function(t,e){var n=e.clientX,r=e.clientY;return t.every(function(t){var e=t.popperRect,i=t.tooltipRect,o=t.interactiveBorder,a=Math.min(e.top,i.top),p=Math.max(e.right,i.right),u=Math.max(e.bottom,i.bottom),s=Math.min(e.left,i.left);return a-r>o||r-u>o||s-n>o||n-p>o})}(S(j.querySelectorAll(c)).concat(j).map(function(t){var e=t._tippy,n=e.popperChildren.tooltip,r=e.props.interactiveBorder;return{popperRect:t.getBoundingClientRect(),tooltipRect:n.getBoundingClientRect(),interactiveBorder:r}}),t)&&(bt(),Vt(t))}function Dt(t){if(!Mt(t))return K.props.interactive?(I.body.addEventListener("mouseleave",Vt),I.addEventListener("mousemove",A),void N(vt,A)):void Vt(t)}function Lt(t){t.target===at()&&(K.props.interactive&&t.relatedTarget&&j.contains(t.relatedTarget)||Vt(t))}function Mt(t){var e="ontouchstart"in window,n=P(t.type,"touch"),r=ot();return e&&q.isTouch&&r&&!n||q.isTouch&&!r&&n}function St(){var n,i=K.props.popperOptions,o=K.popperChildren.arrow,a=w(i,"flip"),p=w(i,"preventOverflow");function u(t){var e=K.state.currentPlacement;K.state.currentPlacement=t.placement,K.props.flip&&!K.props.flipOnUpdate&&(t.flipped&&(K.popperInstance.options.placement=t.placement),C(K.popperInstance.modifiers,"flip","enabled",!1)),X.setAttribute("data-placement",t.placement),!1!==t.attributes["x-out-of-boundaries"]?X.setAttribute("data-out-of-boundaries",""):X.removeAttribute("data-out-of-boundaries");var r=rt(t.placement),i=P(["top","bottom"],r),o=P(["bottom","right"],r);X.style.top="0",X.style.left="0",X.style[i?"top":"left"]=(o?1:-1)*n+"px",e&&e!==t.placement&&K.popperInstance.update()}var s=e({eventsEnabled:!1,placement:K.props.placement},i,{modifiers:e({},i&&i.modifiers,{tippyDistance:{enabled:!0,order:0,fn:function(t){n=function(t,e){var n="string"==typeof e&&P(e,"rem"),r=t.documentElement;return r&&n?parseFloat(getComputedStyle(r).fontSize||String(16))*z(e):z(e)}(I,K.props.distance);var e=rt(t.placement),r=R(e,p&&p.padding,n),i=R(e,a&&a.padding,n),o=K.popperInstance.modifiers;return C(o,"preventOverflow","padding",r),C(o,"flip","padding",i),t}},preventOverflow:e({boundariesElement:K.props.boundary},p),flip:e({enabled:K.props.flip,behavior:K.props.flipBehavior},a),arrow:e({element:o,enabled:!!o},w(i,"arrow")),offset:e({offset:K.props.offset},w(i,"offset"))}),onCreate:function(t){u(t),M(i&&i.onCreate,s.onCreate,[t]),kt()},onUpdate:function(t){u(t),M(i&&i.onUpdate,s.onUpdate,[t]),kt()}});K.popperInstance=new t(r,j,s)}function kt(){0===b?(b++,K.popperInstance.update()):l&&1===b&&(b++,j.offsetHeight,l())}function Pt(t){K.clearDelayTimeouts(),K.popperInstance||St(),t&&ft("onTrigger",[K,t]),wt();var e=ut(!0);e?o=setTimeout(function(){K.show()},e):K.show()}function Vt(t){if(K.clearDelayTimeouts(),ft("onUntrigger",[K,t]),K.state.isVisible){var e=ut(!1);e?a=setTimeout(function(){K.state.isVisible&&K.hide()},e):p=requestAnimationFrame(function(){K.hide()})}else Et()}}function gt(t,r,i){void 0===r&&(r={}),void 0===i&&(i=[]),i=Z.plugins.concat(r.plugins||i),document.addEventListener("touchstart",j,e({},n,{capture:!0})),window.addEventListener("blur",W);var o=e({},Z,{},r,{plugins:i}),a=b(t).reduce(function(t,e){var n=e&&ht(e,o);return n&&t.push(n),t},[]);return A(t)?a[0]:a}gt.version="5.1.2",gt.defaultProps=Z,gt.setDefaultProps=function(t){Object.keys(t).forEach(function(e){Z[e]=t[e]})},gt.currentInput=q;var bt={mouseover:"mouseenter",focusin:"focus",click:"click"};var yt={name:"animateFill",defaultValue:!1,fn:function(t){var e=t.popperChildren,n=e.tooltip,r=e.content,i=t.props.animateFill&&!G?function(){var t=I();return t.className=p,D([t],"hidden"),t}():null;function o(){t.popperChildren.backdrop=i}return{onCreate:function(){i&&(o(),n.insertBefore(i,n.firstElementChild),n.setAttribute("data-animatefill",""),n.style.overflow="hidden",t.setProps({animation:"shift-away",arrow:!1}))},onMount:function(){if(i){var t=n.style.transitionDuration,e=Number(t.replace("ms",""));r.style.transitionDelay=Math.round(e/10)+"ms",i.style.transitionDuration=t,D([i],"visible")}},onShow:function(){i&&(i.style.transitionDuration="0ms")},onHide:function(){i&&D([i],"hidden")},onAfterUpdate:function(){o()}}}};var wt={name:"followCursor",defaultValue:!1,fn:function(t){var e,n=t.reference,r=t.popper,i=H(t.props.triggerTarget||n),o=null,a=!1,p=t.props;function u(){return"manual"===t.props.trigger.trim()}function s(){var e=!!u()||null!==o&&!(0===o.clientX&&0===o.clientY);return t.props.followCursor&&e}function c(){return q.isTouch||"initial"===t.props.followCursor&&t.state.isVisible}function l(){t.popperInstance&&(t.popperInstance.reference=n)}function f(){if(s()||t.props.placement!==p.placement){var e=p.placement,n=e.split("-")[1];a=!0,t.setProps({placement:s()&&n?e.replace(n,"start"===n?"end":"start"):e}),a=!1}}function d(){t.popperInstance&&s()&&(c()||!0!==t.props.followCursor)&&t.popperInstance.disableEventListeners()}function v(){s()?i.addEventListener("mousemove",g):l()}function m(){s()&&g(e)}function h(){i.removeEventListener("mousemove",g)}function g(i){var o=e=i,a=o.clientX,p=o.clientY;if(t.popperInstance&&t.state.currentPlacement){var u=k(i.target,function(t){return t===n}),s=n.getBoundingClientRect(),l=t.props.followCursor,f="horizontal"===l,d="vertical"===l,v=P(["top","bottom"],rt(t.state.currentPlacement)),m=function(t,e){var n=e?t.offsetWidth:t.offsetHeight;return{size:n,x:e?n:0,y:e?0:n}}(r,v),g=m.size,b=m.x,y=m.y;!u&&t.props.interactive||(t.popperInstance.reference={referenceNode:n,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return{width:v?g:0,height:v?0:g,top:(f?s.top:p)-y,bottom:(f?s.bottom:p)+y,left:(d?s.left:a)-b,right:(d?s.right:a)+b}}},t.popperInstance.update()),c()&&h()}}return{onAfterUpdate:function(t,e){var n;a||(n=e,Object.keys(n).forEach(function(t){p[t]=B(n[t],p[t])}),e.placement&&f()),e.placement&&d(),requestAnimationFrame(m)},onMount:function(){m(),d()},onShow:function(){u()&&(e=o={clientX:0,clientY:0},f(),v())},onTrigger:function(t,n){o||(T(n)&&(o={clientX:n.clientX,clientY:n.clientY},e=n),f(),v())},onUntrigger:function(){t.state.isVisible||(h(),o=null)},onHidden:function(){h(),l(),o=null}}}};var Et={name:"inlinePositioning",defaultValue:!1,fn:function(t){var e=t.reference;function n(){return!!t.props.inlinePositioning}return{onHidden:function(){n()&&(t.popperInstance.reference=e)},onShow:function(){n()&&(t.popperInstance.reference={referenceNode:e,clientWidth:0,clientHeight:0,getBoundingClientRect:function(){return function(t,e,n){if(n.length<2||null===t)return e;switch(t){case"top":case"bottom":var r=n[0],i=n[n.length-1],o="top"===t,a=r.top,p=i.bottom,u=o?r.left:i.left,s=o?r.right:i.right;return{top:a,bottom:p,left:u,right:s,width:s-u,height:p-a};case"left":case"right":var c=Math.min.apply(Math,n.map(function(t){return t.left})),l=Math.max.apply(Math,n.map(function(t){return t.right})),f=n.filter(function(e){return"left"===t?e.left===c:e.right===l}),d=f[0].top,v=f[f.length-1].bottom;return{top:d,bottom:v,left:c,right:l,width:l-c,height:v-d};default:return e}}(t.state.currentPlacement&&rt(t.state.currentPlacement),e.getBoundingClientRect(),S(e.getClientRects()))}})}}}};var At={name:"sticky",defaultValue:!1,fn:function(t){var e=t.reference,n=t.popper;function r(e){return!0===t.props.sticky||t.props.sticky===e}var i=null,o=null;function a(){var p=r("reference")?e.getBoundingClientRect():null,u=r("popper")?n.getBoundingClientRect():null;(p&&Tt(i,p)||u&&Tt(o,u))&&t.popperInstance.update(),i=p,o=u,t.state.isMounted&&requestAnimationFrame(a)}return{onMount:function(){t.props.sticky&&a()}}}};function Tt(t,e){return!t||!e||(t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left)}return X&&function(t){var e=document.createElement("style");e.textContent=t,e.setAttribute("data-tippy-stylesheet","");var n=document.head,r=document.querySelector("head>style,head>link");r?n.insertBefore(e,r):n.appendChild(e)}(".tippy-tooltip[data-animation=fade][data-state=hidden]{opacity:0}.tippy-iOS{cursor:pointer!important;-webkit-tap-highlight-color:transparent}.tippy-popper{pointer-events:none;max-width:calc(100vw - 10px);transition-timing-function:cubic-bezier(.165,.84,.44,1);transition-property:transform}.tippy-tooltip{position:relative;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;background-color:#333;transition-property:visibility,opacity,transform;outline:0}.tippy-tooltip[data-placement^=top]>.tippy-arrow{border-width:8px 8px 0;border-top-color:#333;margin:0 3px;transform-origin:50% 0;bottom:-7px}.tippy-tooltip[data-placement^=bottom]>.tippy-arrow{border-width:0 8px 8px;border-bottom-color:#333;margin:0 3px;transform-origin:50% 7px;top:-7px}.tippy-tooltip[data-placement^=left]>.tippy-arrow{border-width:8px 0 8px 8px;border-left-color:#333;margin:3px 0;transform-origin:0 50%;right:-7px}.tippy-tooltip[data-placement^=right]>.tippy-arrow{border-width:8px 8px 8px 0;border-right-color:#333;margin:3px 0;transform-origin:7px 50%;left:-7px}.tippy-tooltip[data-interactive][data-state=visible]{pointer-events:auto}.tippy-tooltip[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{position:absolute;border-color:transparent;border-style:solid}.tippy-content{padding:5px 9px}"),gt.setDefaultProps({plugins:[yt,wt,Et,At]}),gt.createSingleton=function(t,n,r){void 0===n&&(n={}),void 0===r&&(r=[]),r=n.plugins||r,t.forEach(function(t){t.disable()});var i,o,a=e({},Z,{},n).aria,p=!1,u=t.map(function(t){return t.reference}),s={fn:function(e){function n(t){if(i){var n="aria-"+i;t&&!e.props.interactive?o.setAttribute(n,e.popperChildren.tooltip.id):o.removeAttribute(n)}}return{onAfterUpdate:function(t,n){var r=n.aria;void 0!==r&&r!==a&&(p?(p=!0,e.setProps({aria:null}),p=!1):a=r)},onDestroy:function(){t.forEach(function(t){t.enable()})},onMount:function(){n(!0)},onUntrigger:function(){n(!1)},onTrigger:function(r,p){var s=p.currentTarget,c=u.indexOf(s);o=s,i=a,e.state.isVisible&&n(!0),e.popperInstance.reference=s,e.setContent(t[c].props.content)}}}};return gt(I(),e({},n,{plugins:[s].concat(r),aria:null,triggerTarget:u}))},gt.delegate=function(t,n,r){void 0===r&&(r=[]),r=n.plugins||r;var i,o,a=[],p=[],u=n.target,s=(i=["target"],o=e({},n),i.forEach(function(t){delete o[t]}),o),c=e({},s,{plugins:r,trigger:"manual"}),l=e({},s,{plugins:r,showOnCreate:!0}),f=gt(t,c);function d(t){if(t.target){var e=t.target.closest(u);if(e)if(P(e.getAttribute("data-tippy-trigger")||n.trigger||Z.trigger,bt[t.type])){var r=gt(e,l);r&&(p=p.concat(r))}}}function v(t,e,n,r){void 0===r&&(r=!1),t.addEventListener(e,n,r),a.push({node:t,eventType:e,handler:n,options:r})}return U(f).forEach(function(t){var e=t.destroy;t.destroy=function(t){void 0===t&&(t=!0),t&&p.forEach(function(t){t.destroy()}),p=[],a.forEach(function(t){var e=t.node,n=t.eventType,r=t.handler,i=t.options;e.removeEventListener(n,r,i)}),a=[],e()},function(t){var e=t.reference;v(e,"mouseover",d),v(e,"focusin",d),v(e,"click",d)}(t)}),f},gt.hideAll=function(t){var e=void 0===t?{}:t,n=e.exclude,r=e.duration;mt.forEach(function(t){var e=!1;n&&(e=h(n)?t.reference===n:t.popper===n.popper),e||t.hide(r)})},gt.roundArrow='<svg viewBox="0 0 18 7" xmlns="http://www.w3.org/2000/svg"><path d="M0 7s2.021-.015 5.253-4.218C6.584 1.051 7.797.007 9 0c1.203-.007 2.416 1.035 3.761 2.782C16.012 7.005 18 7 18 7H0z"/></svg>',gt}(Popper);
|
2 |
+
//# sourceMappingURL=tippy-bundle.iife.min.js.map
|
admin/le_admin.php
ADDED
@@ -0,0 +1,1885 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 1.0.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
/**
|
28 |
+
* Autoloader
|
29 |
+
*
|
30 |
+
* @since 5.1.1
|
31 |
+
*/
|
32 |
+
require_once plugin_dir_path( __DIR__ ) . 'vendor/autoload.php';
|
33 |
+
use WPLEClient\LEFunctions ;
|
34 |
+
require_once WPLE_DIR . 'classes/le-core.php';
|
35 |
+
require_once WPLE_DIR . 'classes/le-subdir-challenge.php';
|
36 |
+
/**
|
37 |
+
* WPLE_Admin class
|
38 |
+
*
|
39 |
+
* Handles all the aspects of plugin page & cert generation form
|
40 |
+
* @since 1.0.0
|
41 |
+
*/
|
42 |
+
class WPLE_Admin
|
43 |
+
{
|
44 |
+
private $FIREWALL ;
|
45 |
+
public function __construct()
|
46 |
+
{
|
47 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'wple_admin_styles' ) );
|
48 |
+
add_action( 'admin_menu', array( $this, 'wple_admin_menu_page' ) );
|
49 |
+
add_action(
|
50 |
+
'before_wple_admin_form',
|
51 |
+
array( $this, 'wple_debug_log' ),
|
52 |
+
20,
|
53 |
+
1
|
54 |
+
);
|
55 |
+
add_action( 'admin_init', array( $this, 'wple_admin_init_hooks' ) );
|
56 |
+
add_action( 'plugins_loaded', array( $this, 'wple_load_plugin_textdomain' ) );
|
57 |
+
$show_rev = get_option( 'wple_show_review' );
|
58 |
+
if ( $show_rev != FALSE && $show_rev == 1 ) {
|
59 |
+
add_action( 'admin_notices', array( $this, 'wple_rateus' ) );
|
60 |
+
}
|
61 |
+
if ( FALSE !== get_option( 'wple_show_reminder' ) ) {
|
62 |
+
add_action( 'admin_notices', [ $this, 'wple_reminder_notice' ] );
|
63 |
+
}
|
64 |
+
if ( FALSE !== get_option( 'wple_mixed_issues' ) ) {
|
65 |
+
//since 5.3.12
|
66 |
+
add_action( 'admin_notices', [ $this, 'wple_mixed_content_notice' ] );
|
67 |
+
}
|
68 |
+
if ( isset( $_GET['successnotice'] ) ) {
|
69 |
+
add_action( 'admin_notices', array( $this, 'wple_success_notice' ) );
|
70 |
+
}
|
71 |
+
add_action( 'wple_show_reviewrequest', array( $this, 'wple_set_review_flag' ) );
|
72 |
+
add_action( 'wp_ajax_wple_dismiss', array( $this, 'wple_dismiss_notice' ) );
|
73 |
+
add_action( 'wp_ajax_wple_admin_dnsverify', [ $this, 'wple_ajx_verify_dns' ] );
|
74 |
+
add_action( 'wple_ssl_reminder_notice', [ $this, 'wple_start_show_reminder' ] );
|
75 |
+
add_action( 'wp_ajax_wple_admin_httpverify', [ $this, 'wple_ajx_verify_http' ] );
|
76 |
+
add_action( 'wp_ajax_wple_validate_ssl', [ $this, 'wple_validate_nocp_ssl' ] );
|
77 |
+
add_action( 'wp_ajax_wple_getcert_for_copy', [ $this, 'wple_retrieve_certs_forcopy' ] );
|
78 |
+
add_action( 'wp_ajax_wple_include_www', [ $this, 'wple_include_www_check' ] );
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* Enqueue admin styles
|
83 |
+
*
|
84 |
+
* @since 1.0.0
|
85 |
+
* @return void
|
86 |
+
*/
|
87 |
+
public function wple_admin_styles()
|
88 |
+
{
|
89 |
+
wp_enqueue_style(
|
90 |
+
WPLE_NAME,
|
91 |
+
WPLE_URL . 'admin/css/le-admin.min.css',
|
92 |
+
FALSE,
|
93 |
+
WPLE_PLUGIN_VERSION,
|
94 |
+
'all'
|
95 |
+
);
|
96 |
+
wp_enqueue_script(
|
97 |
+
WPLE_NAME . '-popper',
|
98 |
+
WPLE_URL . 'admin/js/popper.min.js',
|
99 |
+
array( 'jquery' ),
|
100 |
+
WPLE_PLUGIN_VERSION,
|
101 |
+
true
|
102 |
+
);
|
103 |
+
wp_enqueue_script(
|
104 |
+
WPLE_NAME . '-tippy',
|
105 |
+
WPLE_URL . 'admin/js/tippy-bundle.iife.min.js',
|
106 |
+
array( 'jquery' ),
|
107 |
+
WPLE_PLUGIN_VERSION,
|
108 |
+
true
|
109 |
+
);
|
110 |
+
wp_enqueue_script(
|
111 |
+
WPLE_NAME,
|
112 |
+
WPLE_URL . 'admin/js/le-admin.js',
|
113 |
+
array( 'jquery', WPLE_NAME . '-tippy', WPLE_NAME . '-popper' ),
|
114 |
+
WPLE_PLUGIN_VERSION,
|
115 |
+
true
|
116 |
+
);
|
117 |
+
wp_enqueue_script(
|
118 |
+
WPLE_NAME . '-fs',
|
119 |
+
'https://checkout.freemius.com/checkout.min.js',
|
120 |
+
array( 'jquery' ),
|
121 |
+
WPLE_PLUGIN_VERSION,
|
122 |
+
false
|
123 |
+
);
|
124 |
+
wp_localize_script( WPLE_NAME, 'SCAN', array(
|
125 |
+
'adminajax' => admin_url( '/admin-ajax.php' ),
|
126 |
+
'base' => site_url( '/', 'https' ),
|
127 |
+
) );
|
128 |
+
}
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Register plugin page
|
132 |
+
*
|
133 |
+
* @since 1.0.0
|
134 |
+
* @return void
|
135 |
+
*/
|
136 |
+
public function wple_admin_menu_page()
|
137 |
+
{
|
138 |
+
add_menu_page(
|
139 |
+
WPLE_NAME,
|
140 |
+
WPLE_NAME,
|
141 |
+
'manage_options',
|
142 |
+
WPLE_SLUG,
|
143 |
+
array( $this, 'wple_menu_page' ),
|
144 |
+
plugin_dir_url( __DIR__ ) . 'admin/assets/icon.png',
|
145 |
+
100
|
146 |
+
);
|
147 |
+
}
|
148 |
+
|
149 |
+
public function wple_load_plugin_textdomain()
|
150 |
+
{
|
151 |
+
load_plugin_textdomain( 'wp-letsencrypt-ssl', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
* Plugin page HTML
|
156 |
+
*
|
157 |
+
* @since 1.0.0
|
158 |
+
* @return void
|
159 |
+
*/
|
160 |
+
public function wple_menu_page()
|
161 |
+
{
|
162 |
+
|
163 |
+
if ( FALSE === get_option( 'wple_version' ) ) {
|
164 |
+
delete_option( 'wple_plan_choose' );
|
165 |
+
update_option( 'wple_version', WPLE_PLUGIN_VERSION );
|
166 |
+
} else {
|
167 |
+
|
168 |
+
if ( version_compare( get_option( 'wple_version' ), '5.6.1', '<=' ) ) {
|
169 |
+
delete_option( 'wple_plan_choose' );
|
170 |
+
update_option( 'wple_version', WPLE_PLUGIN_VERSION );
|
171 |
+
}
|
172 |
+
|
173 |
+
}
|
174 |
+
|
175 |
+
$this->wple_subdir_ipaddress();
|
176 |
+
$eml = '';
|
177 |
+
$leopts = get_option( 'wple_opts' );
|
178 |
+
if ( $opts = get_option( 'wple_opts' ) ) {
|
179 |
+
$eml = ( isset( $opts['email'] ) ? $opts['email'] : '' );
|
180 |
+
}
|
181 |
+
$pluginmode = 'FREE';
|
182 |
+
$errorclass = '';
|
183 |
+
|
184 |
+
if ( !wple_fs()->is__premium_only() && wple_fs()->can_use_premium_code() ) {
|
185 |
+
$pluginmode = 'FREE plugin with PRO License <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Please upload and activate PRO plugin file on PLUGINS page"></span>';
|
186 |
+
$errorclass = ' notproerror';
|
187 |
+
}
|
188 |
+
|
189 |
+
|
190 |
+
if ( wple_fs()->is__premium_only() && !wple_fs()->can_use_premium_code() ) {
|
191 |
+
$pluginmode = 'PRO plugin with FREE License <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Please activate PRO license key via Account page or Activate License option under the plugin in PLUGINS page"></span>';
|
192 |
+
$errorclass = ' notproerror';
|
193 |
+
}
|
194 |
+
|
195 |
+
$html = '
|
196 |
+
<div class="wple-header">
|
197 |
+
<div>
|
198 |
+
<img src="' . WPLE_URL . 'admin/assets/logo.png" class="wple-logo"/> <span class="wple-version">v' . WPLE_PLUGIN_VERSION . ' <span class="wple-pmode' . $errorclass . '">' . $pluginmode . '</span></span>
|
199 |
+
</div>';
|
200 |
+
WPLE_Trait::wple_headernav( $html );
|
201 |
+
$html .= '</div>';
|
202 |
+
|
203 |
+
if ( FALSE === get_option( 'wple_plan_choose' ) || isset( $_GET['comparison'] ) ) {
|
204 |
+
$this->wple_initial_quick_pricing( $html );
|
205 |
+
return;
|
206 |
+
}
|
207 |
+
|
208 |
+
//5.1.0
|
209 |
+
$complete = ( FALSE !== get_option( 'wple_complete' ) ? 1 : 0 );
|
210 |
+
|
211 |
+
if ( $complete ) {
|
212 |
+
$html .= '<div id="wple-sslgen">';
|
213 |
+
$this->wple_completed_block( $html );
|
214 |
+
$html .= '</div>';
|
215 |
+
if ( !wple_fs()->is__premium_only() || !wple_fs()->can_use_premium_code() ) {
|
216 |
+
$this->wple_upgrade_block( $html );
|
217 |
+
}
|
218 |
+
echo $html ;
|
219 |
+
return;
|
220 |
+
}
|
221 |
+
|
222 |
+
$this->wple_success_block( $html );
|
223 |
+
$this->wple_error_block( $html );
|
224 |
+
if ( !isset( $_GET['wpleauto'] ) && isset( $_GET['subdir'] ) ) {
|
225 |
+
$this->wple_subdir_challenges( $html, $leopts );
|
226 |
+
}
|
227 |
+
|
228 |
+
if ( !wple_fs()->is__premium_only() || !wple_fs()->can_use_premium_code() ) {
|
229 |
+
|
230 |
+
if ( isset( $_GET['subdir'] ) ) {
|
231 |
+
$this->wple_upgrade_block( $html );
|
232 |
+
echo $html ;
|
233 |
+
return;
|
234 |
+
}
|
235 |
+
|
236 |
+
|
237 |
+
if ( isset( $_GET['success'] ) ) {
|
238 |
+
$this->wple_upgrade_block( $html );
|
239 |
+
echo $html ;
|
240 |
+
return;
|
241 |
+
}
|
242 |
+
|
243 |
+
}
|
244 |
+
|
245 |
+
$mappeddomain = '';
|
246 |
+
$formheader = esc_html__( 'SSL INSTALL FORM - ENTER YOUR EMAIL BELOW AND GENERATE SSL', 'wp-letsencrypt-ssl' );
|
247 |
+
$currentdomain = esc_html( str_ireplace( array( 'http://', 'https://' ), array( '', '' ), site_url() ) );
|
248 |
+
$maindomain = $currentdomain;
|
249 |
+
$slashpos = stripos( $currentdomain, '/' );
|
250 |
+
|
251 |
+
if ( FALSE !== $slashpos ) {
|
252 |
+
//subdir installation
|
253 |
+
$maindomain = substr( $currentdomain, 0, $slashpos );
|
254 |
+
$mappeddomain = '<label style="display: block; padding: 10px 5px; color: #aaa;font-size:15px;">' . esc_html__( 'PRIMARY DOMAIN', 'wp-letsencrypt-ssl' ) . '</label>
|
255 |
+
<p style="width: 800px; max-width:100%; margin: 5px auto 20px;">' . WPLE_Trait::wple_kses( sprintf( __( '<strong>NOTE:</strong> Since you are willing to install SSL certificate for sub-directory site, SSL certificate will be generated for your primary domain <strong>%s</strong> which will cover your primary domain + ALL sub-directory sites.', 'wp-letsencrypt-ssl' ), $maindomain ) ) . '</p>
|
256 |
+
<input type="text" name="wple_domain" class="wple-domain-input" value="' . esc_attr( $maindomain ) . '" readonly><br />';
|
257 |
+
}
|
258 |
+
|
259 |
+
//since 5.3.4
|
260 |
+
$tempdomain = '';
|
261 |
+
if ( FALSE !== stripos( $maindomain, 'temp.domains' ) ) {
|
262 |
+
$tempdomain = '<p style="width: 800px; max-width:100%; margin: 5px auto 20px;">' . sprintf(
|
263 |
+
esc_html__( "%sWARNING:%s You are trying to install SSL for %stemporary domain%s which is not possible. Please point your real domain like wpencryption.com to your site and update your site url in %ssettings%s > %sgeneral%s before you could generate SSL.", "wp-letsencrypt-ssl" ),
|
264 |
+
"<strong>",
|
265 |
+
"</strong>",
|
266 |
+
"<strong>",
|
267 |
+
"</strong>",
|
268 |
+
"<strong>",
|
269 |
+
"</strong>",
|
270 |
+
"<strong>",
|
271 |
+
"</strong>"
|
272 |
+
) . '</p>';
|
273 |
+
}
|
274 |
+
if ( isset( $leopts['type'] ) && $leopts['type'] == 'wildcard' ) {
|
275 |
+
$html .= '<script>
|
276 |
+
jQuery(document).ready(function(){
|
277 |
+
jQuery(".single-wildcard-switch").trigger("click");
|
278 |
+
});
|
279 |
+
</script>';
|
280 |
+
}
|
281 |
+
$html .= '<div id="wple-sslgen">
|
282 |
+
<h2>' . $formheader . '</h2>';
|
283 |
+
if ( is_multisite() && !wple_fs()->can_use_premium_code__premium_only() ) {
|
284 |
+
$html .= '<p class="wple-multisite">' . WPLE_Trait::wple_kses( __( 'Upgrade to <strong>PRO</strong> version to avail Wildcard SSL support for multisite and ability to install SSL for mapped domains (different domain names).', 'wp-letsencrypt-ssl' ) ) . '</p>';
|
285 |
+
}
|
286 |
+
$html .= WPLE_Trait::wple_progress_bar();
|
287 |
+
//$cname = '';
|
288 |
+
//if (FALSE === stripos($currentdomain, '/')) {
|
289 |
+
// if (stripos($currentdomain, 'www') === FALSE) {
|
290 |
+
// $cname = '<span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr__("Add a CNAME with name 'www' pointing to your non-www domain", 'wp-letsencrypt-ssl') . '. ' . esc_attr__("Refer FAQ if you want to generate SSL for both www & non-www domain.", 'wp-letsencrypt-ssl') . '"></span>';
|
291 |
+
// } else {
|
292 |
+
//$cname = '<span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr__("Refer FAQ if you want to generate SSL for both www & non-www domain.", 'wp-letsencrypt-ssl') . '"></span>';
|
293 |
+
//}
|
294 |
+
//}
|
295 |
+
$bothchecked = '';
|
296 |
+
$leadminform = '<form method="post" class="le-genform single-genform">' . $mappeddomain . $tempdomain . '
|
297 |
+
<input type="email" name="wple_email" class="wple_email" value="' . esc_attr( $eml ) . '" placeholder="' . esc_attr__( 'Enter your email address', 'wp-letsencrypt-ssl' ) . '" ><br />';
|
298 |
+
// if (FALSE === stripos('www', $maindomain)) {
|
299 |
+
// $altdomain = 'www.' . $maindomain;
|
300 |
+
// } else {
|
301 |
+
// $altdomain = str_ireplace('www.', '', $maindomain);
|
302 |
+
// }
|
303 |
+
// $altdomaintest = wp_remote_head('http://' . $altdomain, array('sslverify' => false, 'timeout' => 30));
|
304 |
+
///if (!is_wp_error($altdomaintest) || isset($_GET['includewww'])) {
|
305 |
+
$leadminform .= '<span class="lecheck">
|
306 |
+
<label class="checkbox-label">
|
307 |
+
<input type="checkbox" name="wple_include_www" class="wple_include_www" value="1" ' . $bothchecked . '>
|
308 |
+
<span class="checkbox-custom rectangular"></span>
|
309 |
+
</label>
|
310 |
+
' . esc_html__( 'Generate SSL Certificate for both www & non-www version of domain', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr__( "Before enabling this - please make sure both www & non-www version of your domain works!. Add a CNAME with name 'www' pointing to your non-www domain in your domain DNS zone editor", 'wp-letsencrypt-ssl' ) . '"></span></label>
|
311 |
+
</span><br />';
|
312 |
+
///}
|
313 |
+
|
314 |
+
if ( isset( $_GET['includeemail'] ) ) {
|
315 |
+
$leadminform .= '<span class="lecheck">
|
316 |
+
<label class="checkbox-label">
|
317 |
+
<input type="checkbox" name="wple_include_mail" class="wple_include_mail" value="1">
|
318 |
+
<span class="checkbox-custom rectangular"></span>
|
319 |
+
</label>
|
320 |
+
' . esc_html__( 'Secure POP/IMAP email server', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . sprintf( esc_attr__( "This option will secure %s but DNS based domain verification is MANDATORY", 'wp-letsencrypt-ssl' ), 'mail.' . $maindomain ) . '"></span></label>
|
321 |
+
</span><br />';
|
322 |
+
$webmail = 'webmail.' . $maindomain;
|
323 |
+
$leadminform .= '<span class="lecheck">
|
324 |
+
<label class="checkbox-label">
|
325 |
+
<input type="checkbox" name="wple_include_webmail" class="wple_include_webmail" value="1">
|
326 |
+
<span class="checkbox-custom rectangular"></span>
|
327 |
+
</label>
|
328 |
+
' . sprintf( esc_html__( 'Secure %s', 'wp-letsencrypt-ssl' ), $webmail ) . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . sprintf( esc_attr__( "This option will secure %s but DNS based domain verification is MANDATORY", 'wp-letsencrypt-ssl' ), $webmail ) . '"></span></label>
|
329 |
+
</span><br />';
|
330 |
+
}
|
331 |
+
|
332 |
+
$leadminform .= '<span class="lecheck">
|
333 |
+
<label class="checkbox-label">
|
334 |
+
<input type="checkbox" name="wple_send_usage" value="1" checked>
|
335 |
+
<span class="checkbox-custom rectangular"></span>
|
336 |
+
</label>
|
337 |
+
' . esc_html__( 'Anonymously send response data to get better support', 'wp-letsencrypt-ssl' ) . '</label>
|
338 |
+
</span><br />';
|
339 |
+
$leadminform .= '<span class="lecheck">
|
340 |
+
<label class="checkbox-label">
|
341 |
+
<input type="checkbox" name="wple_agree_le_tos" class="wple_agree_le" value="1">
|
342 |
+
<span class="checkbox-custom rectangular"></span>
|
343 |
+
</label>
|
344 |
+
' . WPLE_Trait::wple_kses( sprintf( __( "I agree to <b>Let's Encrypt</b> %sTerms of service%s", "wp-letsencrypt-ssl" ), '<a href="' . esc_attr__( 'https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf', 'wp-letsencrypt-ssl' ) . '" rel="nofollow" target="_blank" style="margin-left:5px">', '</a>' ), 'a' ) . '
|
345 |
+
</span>
|
346 |
+
<span class="lecheck">
|
347 |
+
<label class="checkbox-label">
|
348 |
+
<input type="checkbox" name="wple_agree_gws_tos" class="wple_agree_gws" value="1">
|
349 |
+
<span class="checkbox-custom rectangular"></span>
|
350 |
+
</label>
|
351 |
+
' . WPLE_Trait::wple_kses( sprintf( __( "I agree to <b>WP Encryption</b> %sTerms of service%s", "wp-letsencrypt-ssl" ), '<a href="https://gowebsmarty.com/terms-and-conditions/" rel="nofollow" target="_blank" style="margin-left:5px">', '</a>' ), 'a' ) . '
|
352 |
+
</span>
|
353 |
+
' . wp_nonce_field(
|
354 |
+
'legenerate',
|
355 |
+
'letsencrypt',
|
356 |
+
false,
|
357 |
+
false
|
358 |
+
) . '
|
359 |
+
<button type="submit" name="generate-certs" id="singledvssl">' . esc_html__( 'Generate SSL Certificate', 'wp-letsencrypt-ssl' ) . '</button>
|
360 |
+
</form>
|
361 |
+
|
362 |
+
<div id="wple-error-popper">
|
363 |
+
<div class="wple-flex">
|
364 |
+
<img src="' . WPLE_URL . 'admin/assets/loader.png" class="wple-loader"/>
|
365 |
+
<div class="wple-error">Error</div>
|
366 |
+
</div>
|
367 |
+
</div>';
|
368 |
+
$nonwww = str_ireplace( 'www.', '', $currentdomain );
|
369 |
+
if ( FALSE !== ($ps = stripos( $nonwww, '/' )) ) {
|
370 |
+
$nonwww = substr( $nonwww, 0, $ps );
|
371 |
+
}
|
372 |
+
$wwwdomain = 'www.' . $nonwww;
|
373 |
+
|
374 |
+
if ( FALSE != stripos( $currentdomain, 'www.' ) ) {
|
375 |
+
$wwwdomain = $nonwww;
|
376 |
+
$nonwww = 'www.' . $nonwww;
|
377 |
+
}
|
378 |
+
|
379 |
+
$showonpro = '';
|
380 |
+
$html .= '<div class="wple-single-dv-ssl">
|
381 |
+
<div class="wple-info-box">
|
382 |
+
<h3>' . esc_html__( 'Domains Covered', 'wp-letsencrypt-ssl' ) . '</h3>
|
383 |
+
<strong>' . $nonwww . '</strong>
|
384 |
+
<div class="wple-www' . $showonpro . '"><strong>' . $wwwdomain . '</strong></div>
|
385 |
+
<div class="wple-wc"><strong>*.' . $nonwww . '</strong></div>
|
386 |
+
</div>';
|
387 |
+
ob_start();
|
388 |
+
do_action( 'before_wple_admin_form', $html );
|
389 |
+
$html .= ob_get_contents();
|
390 |
+
ob_end_clean();
|
391 |
+
$html .= apply_filters( 'wple_admin_form', $leadminform );
|
392 |
+
ob_start();
|
393 |
+
do_action( 'after_wple_admin_form', $html );
|
394 |
+
$html .= ob_get_contents();
|
395 |
+
ob_end_clean();
|
396 |
+
$html .= '</div>';
|
397 |
+
$prosupport = WPLE_Trait::wple_kses( sprintf( __( 'Brought to you by %sWP Encryption%s.' ), '<a href="https://wpencryption.com" target="_blank">', '</a>' ), 'a' );
|
398 |
+
$html .= '
|
399 |
+
<div class="le-powered">
|
400 |
+
<span>' . $prosupport . ' ' . WPLE_Trait::wple_kses( sprintf( 'SSL Certificate will be generated by %s (An open certificate authority).', "<b>Let's Encrypt</b>" ) ) . '</span>
|
401 |
+
</div>';
|
402 |
+
$html .= '
|
403 |
+
</div><!--wple-sslgen-->';
|
404 |
+
|
405 |
+
if ( !wple_fs()->is__premium_only() || !wple_fs()->can_use_premium_code() ) {
|
406 |
+
$this->wple_upgrade_block( $html );
|
407 |
+
} else {
|
408 |
+
$this->wple_expert_block( $html );
|
409 |
+
}
|
410 |
+
|
411 |
+
echo $html ;
|
412 |
+
}
|
413 |
+
|
414 |
+
/**
|
415 |
+
* log process & error in debug.log file
|
416 |
+
*
|
417 |
+
* @since 1.0.0
|
418 |
+
* @param string $html
|
419 |
+
* @return void
|
420 |
+
*/
|
421 |
+
public function wple_debug_log( $html )
|
422 |
+
{
|
423 |
+
|
424 |
+
if ( !file_exists( WPLE_DEBUGGER ) ) {
|
425 |
+
wp_mkdir_p( WPLE_DEBUGGER );
|
426 |
+
$htacs = '<Files debug.log>' . "\n" . 'Order allow,deny' . "\n" . 'Deny from all' . "\n" . '</Files>';
|
427 |
+
file_put_contents( WPLE_DEBUGGER . '.htaccess', $htacs );
|
428 |
+
}
|
429 |
+
|
430 |
+
//show only upon error since 4.6.0
|
431 |
+
|
432 |
+
if ( isset( $_GET['error'] ) ) {
|
433 |
+
$html = '<div class="toggle-debugger"><span class="dashicons dashicons-arrow-down-alt2"></span> ' . esc_html__( 'Show/hide full response', 'wp-letsencrypt-ssl' ) . '</div>';
|
434 |
+
$file = WPLE_DEBUGGER . 'debug.log';
|
435 |
+
|
436 |
+
if ( file_exists( $file ) ) {
|
437 |
+
$log = file_get_contents( $file );
|
438 |
+
$hideh2 = '';
|
439 |
+
if ( isset( $_GET['dnsverified'] ) || isset( $_GET['dnsverify'] ) ) {
|
440 |
+
$hideh2 = 'hideheader';
|
441 |
+
}
|
442 |
+
$html .= '<div class="le-debugger running ' . $hideh2 . '"><h3>' . esc_html__( 'Response Log', 'wp-letsencrypt-ssl' ) . ':</h3>' . wp_kses_post( nl2br( $log ) ) . '</div>';
|
443 |
+
} else {
|
444 |
+
$html .= '<div class="le-debugger">' . esc_html__( "Full response will be shown here", 'wp-letsencrypt-ssl' ) . '</div>';
|
445 |
+
}
|
446 |
+
|
447 |
+
echo $html ;
|
448 |
+
}
|
449 |
+
|
450 |
+
}
|
451 |
+
|
452 |
+
/**
|
453 |
+
* Save email & proceed upon clicking install SSL
|
454 |
+
*
|
455 |
+
* @since 1.0.0
|
456 |
+
* @return void
|
457 |
+
*/
|
458 |
+
public function wple_save_email_generate_certs()
|
459 |
+
{
|
460 |
+
//since 2.4.0
|
461 |
+
//force https upon success
|
462 |
+
|
463 |
+
if ( isset( $_POST['wple-https'] ) ) {
|
464 |
+
if ( !wp_verify_nonce( $_POST['sslready'], 'wplehttps' ) || !current_user_can( 'manage_options' ) ) {
|
465 |
+
exit( 'Unauthorized access' );
|
466 |
+
}
|
467 |
+
$basedomain = str_ireplace( array( 'http://', 'https://' ), array( '', '' ), addslashes( site_url() ) );
|
468 |
+
//4.7
|
469 |
+
if ( FALSE != stripos( $basedomain, '/' ) ) {
|
470 |
+
$basedomain = substr( $basedomain, 0, stripos( $basedomain, '/' ) );
|
471 |
+
}
|
472 |
+
$client = WPLE_Trait::wple_verify_ssl( $basedomain );
|
473 |
+
|
474 |
+
if ( !$client && !is_ssl() ) {
|
475 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption&success=1&nossl=1', 'http' ) );
|
476 |
+
exit;
|
477 |
+
}
|
478 |
+
|
479 |
+
// $SSLCheck = @fsockopen("ssl://" . $basedomain, 443, $errno, $errstr, 30);
|
480 |
+
// if (!$SSLCheck) {
|
481 |
+
// wp_redirect(admin_url('/admin.php?page=wp_encryption&success=1&nossl=1', 'http'));
|
482 |
+
// exit();
|
483 |
+
// }
|
484 |
+
$reverter = uniqid( 'wple' );
|
485 |
+
$savedopts = get_option( 'wple_opts' );
|
486 |
+
$savedopts['force_ssl'] = 1;
|
487 |
+
$savedopts['revertnonce'] = $reverter;
|
488 |
+
WPLE_Trait::wple_send_reverter_secret( $reverter );
|
489 |
+
update_option( 'wple_opts', $savedopts );
|
490 |
+
delete_option( 'wple_error' );
|
491 |
+
//complete
|
492 |
+
update_option( 'wple_complete', 1 );
|
493 |
+
update_option( 'siteurl', str_ireplace( 'http:', 'https:', get_option( 'siteurl' ) ) );
|
494 |
+
update_option( 'home', str_ireplace( 'http:', 'https:', get_option( 'home' ) ) );
|
495 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption', 'https' ) );
|
496 |
+
exit;
|
497 |
+
}
|
498 |
+
|
499 |
+
//single domain ssl
|
500 |
+
|
501 |
+
if ( isset( $_POST['generate-certs'] ) ) {
|
502 |
+
if ( !wp_verify_nonce( $_POST['letsencrypt'], 'legenerate' ) || !current_user_can( 'manage_options' ) ) {
|
503 |
+
die( 'Unauthorized request' );
|
504 |
+
}
|
505 |
+
if ( empty($_POST['wple_email']) ) {
|
506 |
+
wp_die( esc_html__( 'Please input valid email address', 'wp-letsencrypt-ssl' ) );
|
507 |
+
}
|
508 |
+
$leopts = array(
|
509 |
+
'email' => sanitize_email( $_POST['wple_email'] ),
|
510 |
+
'date' => date( 'd-m-Y' ),
|
511 |
+
'expiry' => '',
|
512 |
+
'type' => 'single',
|
513 |
+
'send_usage' => ( isset( $_POST['wple_send_usage'] ) ? 1 : 0 ),
|
514 |
+
'include_www' => ( isset( $_POST['wple_include_www'] ) ? 1 : 0 ),
|
515 |
+
'include_mail' => ( isset( $_POST['wple_include_mail'] ) ? 1 : 0 ),
|
516 |
+
'include_webmail' => ( isset( $_POST['wple_include_webmail'] ) ? 1 : 0 ),
|
517 |
+
'agree_gws_tos' => ( isset( $_POST['wple_agree_gws_tos'] ) ? 1 : 0 ),
|
518 |
+
'agree_le_tos' => ( isset( $_POST['wple_agree_le_tos'] ) ? 1 : 0 ),
|
519 |
+
);
|
520 |
+
|
521 |
+
if ( isset( $_POST['wple_domain'] ) && !is_multisite() ) {
|
522 |
+
$leopts['subdir'] = 1;
|
523 |
+
$leopts['domain'] = sanitize_text_field( $_POST['wple_domain'] );
|
524 |
+
}
|
525 |
+
|
526 |
+
update_option( 'wple_opts', $leopts );
|
527 |
+
new WPLE_Core( $leopts );
|
528 |
+
}
|
529 |
+
|
530 |
+
}
|
531 |
+
|
532 |
+
/**
|
533 |
+
* Download cert files based on clicked link
|
534 |
+
*
|
535 |
+
* certs for multisite mapped domains cannot be downloaded yet
|
536 |
+
* @since 1.0.0
|
537 |
+
* @return void
|
538 |
+
*/
|
539 |
+
public function wple_download_files()
|
540 |
+
{
|
541 |
+
|
542 |
+
if ( isset( $_GET['le'] ) && current_user_can( 'manage_options' ) ) {
|
543 |
+
switch ( $_GET['le'] ) {
|
544 |
+
case '1':
|
545 |
+
$file = uniqid() . '-cert.crt';
|
546 |
+
file_put_contents( $file, file_get_contents( ABSPATH . 'keys/certificate.crt' ) );
|
547 |
+
break;
|
548 |
+
case '2':
|
549 |
+
$file = uniqid() . '-key.pem';
|
550 |
+
file_put_contents( $file, file_get_contents( ABSPATH . 'keys/private.pem' ) );
|
551 |
+
break;
|
552 |
+
case '3':
|
553 |
+
$file = uniqid() . '-cabundle.crt';
|
554 |
+
|
555 |
+
if ( file_exists( ABSPATH . 'keys/cabundle.crt' ) ) {
|
556 |
+
$cabundlefile = file_get_contents( ABSPATH . 'keys/cabundle.crt' );
|
557 |
+
} else {
|
558 |
+
$cabundlefile = file_get_contents( WPLE_DIR . 'cabundle/ca.crt' );
|
559 |
+
}
|
560 |
+
|
561 |
+
file_put_contents( $file, $cabundlefile );
|
562 |
+
break;
|
563 |
+
}
|
564 |
+
header( 'Content-Description: File Transfer' );
|
565 |
+
header( 'Content-Type: text/plain' );
|
566 |
+
header( 'Content-Length: ' . filesize( $file ) );
|
567 |
+
header( 'Content-Disposition: attachment; filename=' . basename( $file ) );
|
568 |
+
readfile( $file );
|
569 |
+
if ( file_exists( $file ) ) {
|
570 |
+
unlink( $file );
|
571 |
+
}
|
572 |
+
exit;
|
573 |
+
}
|
574 |
+
|
575 |
+
}
|
576 |
+
|
577 |
+
/**
|
578 |
+
* Rate us admin notice
|
579 |
+
*
|
580 |
+
* @since 2.0.0
|
581 |
+
* @return void
|
582 |
+
*/
|
583 |
+
public function wple_rateus()
|
584 |
+
{
|
585 |
+
$cert = ABSPATH . 'keys/certificate.crt';
|
586 |
+
|
587 |
+
if ( file_exists( $cert ) ) {
|
588 |
+
if ( isset( $_GET['page'] ) && $_GET['page'] == 'wp_encryption' ) {
|
589 |
+
return;
|
590 |
+
}
|
591 |
+
$reviewnonce = wp_create_nonce( 'wplereview' );
|
592 |
+
$html = '<div class="notice notice-info wple-admin-review">
|
593 |
+
<div class="wple-review-box">
|
594 |
+
<img src="' . WPLE_URL . 'admin/assets/symbol.png"/>
|
595 |
+
<span><strong>' . esc_html__( 'Congratulations!', 'wp-letsencrypt-ssl' ) . '</strong><p>' . WPLE_Trait::wple_kses( __( 'SSL certificate generated successfully!. <b>WP Encryption</b> just saved you several $$$ by generating free SSL certificate in record time!. Could you please do us a BIG favor & rate us with 5 star review to support further development of this plugin.', 'wp-letsencrypt-ssl' ) ) . '</p></span>
|
596 |
+
</div>
|
597 |
+
<a class="wple-lets-review wplerevbtn" href="https://wordpress.org/support/plugin/wp-letsencrypt-ssl/reviews/#new-post" rel="nofollow noopener" target="_blank">' . esc_html__( 'Rate plugin', 'wp-letsencrypt-ssl' ) . '</a>
|
598 |
+
<a class="wple-did-review wplerevbtn" href="#" data-nc="' . esc_attr( $reviewnonce ) . '" data-action="1">' . esc_html__( 'I already did', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-smiley"></span></a>
|
599 |
+
<a class="wple-later-review wplerevbtn" href="#" data-nc="' . esc_attr( $reviewnonce ) . '" data-action="2">' . esc_html__( 'Remind me later', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-clock"></span></a>
|
600 |
+
</div>';
|
601 |
+
echo $html ;
|
602 |
+
}
|
603 |
+
|
604 |
+
}
|
605 |
+
|
606 |
+
/**
|
607 |
+
* Check if wp install is IP or subdir based
|
608 |
+
*
|
609 |
+
* @since 2.4.0
|
610 |
+
* @return void
|
611 |
+
*/
|
612 |
+
public function wple_subdir_ipaddress()
|
613 |
+
{
|
614 |
+
$siteURL = str_ireplace( array( 'http://', 'https://', 'www.' ), array( '', '', '' ), site_url() );
|
615 |
+
$flg = 0;
|
616 |
+
if ( filter_var( $siteURL, FILTER_VALIDATE_IP ) ) {
|
617 |
+
$flg = 1;
|
618 |
+
}
|
619 |
+
if ( FALSE !== stripos( $siteURL, 'localhost' ) ) {
|
620 |
+
$flg = 1;
|
621 |
+
}
|
622 |
+
|
623 |
+
if ( FALSE != stripos( $siteURL, '/' ) && is_multisite() ) {
|
624 |
+
$html = '<div class="wrap" id="le-wrap">
|
625 |
+
<div class="le-inner">
|
626 |
+
<div class="wple-header">
|
627 |
+
<img src="' . WPLE_URL . 'admin/assets/logo.png" class="wple-logo"/> <span class="wple-version">v' . esc_html( WPLE_PLUGIN_VERSION ) . '</span>
|
628 |
+
</div>
|
629 |
+
<div class="wple-warning-notice">
|
630 |
+
<h2>' . esc_html__( 'You do not need to install SSL for each sub-directory site in multisite, Please install SSL for your primary domain and it will cover ALL sub directory sites too.', 'wp-letsencrypt-ssl' ) . '</h2>
|
631 |
+
</div>
|
632 |
+
</div>
|
633 |
+
</div>';
|
634 |
+
echo $html ;
|
635 |
+
wp_die();
|
636 |
+
}
|
637 |
+
|
638 |
+
|
639 |
+
if ( $flg ) {
|
640 |
+
$html = '<div class="wrap" id="le-wrap">
|
641 |
+
<div class="le-inner">
|
642 |
+
<div class="wple-header">
|
643 |
+
<img src="' . WPLE_URL . 'admin/assets/logo.png" class="wple-logo"/> <span class="wple-version">v' . esc_html( WPLE_PLUGIN_VERSION ) . '</span>
|
644 |
+
</div>
|
645 |
+
<div class="wple-warning-notice">
|
646 |
+
<h2>' . esc_html__( 'SSL Certificates cannot be issued for localhost and IP address based WordPress site. Please use this on your real domain based WordPress site.', 'wp-letsencrypt-ssl' ) . ' ' . esc_html__( 'This restriction is not implemented by WP Encryption but its how SSL certificates work.', 'wp-letsencrypt-ssl' ) . '</h2>
|
647 |
+
</div>
|
648 |
+
</div>
|
649 |
+
</div>';
|
650 |
+
echo $html ;
|
651 |
+
wp_die();
|
652 |
+
}
|
653 |
+
|
654 |
+
}
|
655 |
+
|
656 |
+
/**
|
657 |
+
* Upgrade to PRO
|
658 |
+
*
|
659 |
+
* @param string $html
|
660 |
+
* @since 2.5.0
|
661 |
+
* @return void
|
662 |
+
*/
|
663 |
+
public function wple_upgrade_block( &$html )
|
664 |
+
{
|
665 |
+
$upgradeurl = admin_url( '/admin.php?page=wp_encryption-pricing' );
|
666 |
+
///$upgradeurl = admin_url('/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=lifetime&pricing_id=7965¤cy=usd&coupon=FIRSTBUY');
|
667 |
+
$nopricing = get_option( 'wple_no_pricing' );
|
668 |
+
$automatic = esc_html__( 'Automatic', 'wp-letsencrypt-ssl' );
|
669 |
+
$manual = esc_html__( 'Manual', 'wp-letsencrypt-ssl' );
|
670 |
+
$domain = str_ireplace( array( 'https://', 'http://', 'www.' ), '', site_url() );
|
671 |
+
$dverify = $automatic;
|
672 |
+
if ( stripos( $domain, '/' ) != FALSE ) {
|
673 |
+
//subdir site
|
674 |
+
$dverify = $manual;
|
675 |
+
}
|
676 |
+
$html .= '
|
677 |
+
<div id="wple-upgradepro">';
|
678 |
+
|
679 |
+
if ( FALSE !== ($cp = get_option( 'wple_have_cpanel' )) && $cp ) {
|
680 |
+
$html .= '<strong style="display: block; text-align: center; color: #666;">Woot Woot! You have <b>CPANEL</b>! Why struggle with manual SSL renewal every 90 days? - Enjoy 100% automation with PRO version.</strong>';
|
681 |
+
///$upgradeurl = admin_url('/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=lifetime&pricing_id=7965¤cy=usd');
|
682 |
+
}
|
683 |
+
|
684 |
+
$compareurl = 'https://wpencryption.com?utm_source=wordpress&utm_medium=comparison&utm_campaign=wpencryption';
|
685 |
+
//$compareurl = admin_url('/admin.php?page=wp_encryption&comparison=1');
|
686 |
+
|
687 |
+
if ( FALSE != $nopricing ) {
|
688 |
+
$compareurl = admin_url( '/admin.php?page=wp_encryption&comparison=1' );
|
689 |
+
//$upgradeurl = admin_url('/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=11394&plan_name=pro&billing_cycle=annual&pricing_id=11717¤cy=usd');
|
690 |
+
$html .= '<div class="wple-error-firewall fire-pro wple-procdn">
|
691 |
+
<div>
|
692 |
+
<img src="' . WPLE_URL . 'admin/assets/firewall-shield-pro.png"/>
|
693 |
+
</div>
|
694 |
+
<div class="wple-upgrade-features">
|
695 |
+
<span><b>Automatic SSL Installation</b><br>Hassle free automatic installation of Premium SSL Certificate - No configuration required.</span>
|
696 |
+
<span><b>Automatic SSL Renewal</b><br>Your SSL certificate will be automatically renewed in background without the need of any action or manual work.</span>
|
697 |
+
<span><b>Security</b><br>Protection against known vulnerabilities, Bad Bots, Brute Force, DDOS, Spam & much more attack vectors.</span>
|
698 |
+
<span><b>Automatic CDN</b><br>Your site is served from 42 full scale edge locations for faster content delivery and faster performance.</span>
|
699 |
+
</div>
|
700 |
+
</div>';
|
701 |
+
} else {
|
702 |
+
$html .= '<div class="wple-plans">
|
703 |
+
<span class="free">* ' . esc_html__( 'FREE', 'wp-letsencrypt-ssl' ) . '</span>
|
704 |
+
<span class="pro">* ' . esc_html__( 'PRO', 'wp-letsencrypt-ssl' ) . '</span>
|
705 |
+
</div>
|
706 |
+
<div class="wple-plan-compare">
|
707 |
+
<div class="wple-compare-item">
|
708 |
+
<img src="' . WPLE_URL . 'admin/assets/verified.png"/>
|
709 |
+
<h4>' . esc_html__( 'HTTP Verification', 'wp-letsencrypt-ssl' ) . '</h4>
|
710 |
+
<span class="wple-free">' . $manual . '</span>
|
711 |
+
<span class="wple-pro">' . $automatic . '</span>
|
712 |
+
</div>
|
713 |
+
<div class="wple-compare-item">
|
714 |
+
<img src="' . WPLE_URL . 'admin/assets/DNS.png"/>
|
715 |
+
<h4>' . esc_html__( 'DNS Verification', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr__( 'In case of HTTP verification fail / not possible', 'wp-letsencrypt-ssl' ) . '"></span></h4>
|
716 |
+
<span class="wple-free">' . $manual . '</span>
|
717 |
+
<span class="wple-pro">' . $automatic . '</span>
|
718 |
+
</div>
|
719 |
+
<div class="wple-compare-item">
|
720 |
+
<img src="' . WPLE_URL . 'admin/assets/Install.png"/>
|
721 |
+
<h4>' . esc_html__( 'SSL Installation', 'wp-letsencrypt-ssl' ) . ' <!--<span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr__( 'PRO - We offer one time free manual support for non-cPanel based sites', 'wp-letsencrypt-ssl' ) . '"></span>--></h4>
|
722 |
+
<span class="wple-free">' . $manual . '</span>
|
723 |
+
<span class="wple-pro">' . $automatic . '</span>
|
724 |
+
</div>
|
725 |
+
<div class="wple-compare-item">
|
726 |
+
<img src="' . WPLE_URL . 'admin/assets/renewal.png"/>
|
727 |
+
<h4>' . esc_html__( 'SSL Renewal', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr__( 'Free users must manually renew / re-generate SSL certificate every 90 days.', 'wp-letsencrypt-ssl' ) . '"></span></h4>
|
728 |
+
<span class="wple-free">' . $manual . '</span>
|
729 |
+
<span class="wple-pro">' . $automatic . '</span>
|
730 |
+
</div>
|
731 |
+
<div class="wple-compare-item">
|
732 |
+
<img src="' . WPLE_URL . 'admin/assets/wildcard.png"/>
|
733 |
+
<h4>' . esc_html__( 'Wildcard SSL', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr__( 'PRO - Your domain DNS must be managed by cPanel or Godaddy for full automation', 'wp-letsencrypt-ssl' ) . '"></span></h4>
|
734 |
+
<span class="wple-free">' . esc_html__( 'Not Available', 'wp-letsencrypt-ssl' ) . '</span>
|
735 |
+
<span class="wple-pro">' . esc_html__( 'Available', 'wp-letsencrypt-ssl' ) . '</span>
|
736 |
+
</div>
|
737 |
+
<div class="wple-compare-item">
|
738 |
+
<img src="' . WPLE_URL . 'admin/assets/multisite.png"/>
|
739 |
+
<h4>' . esc_html__( 'Multisite Support', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr__( 'PRO - Support for Multisite + Mapped domains', 'wp-letsencrypt-ssl' ) . '"></span></h4>
|
740 |
+
<span class="wple-free">' . esc_html__( 'Not Available', 'wp-letsencrypt-ssl' ) . '</span>
|
741 |
+
<span class="wple-pro">' . esc_html__( 'Available', 'wp-letsencrypt-ssl' ) . '</span>
|
742 |
+
</div>
|
743 |
+
</div>';
|
744 |
+
}
|
745 |
+
|
746 |
+
///$html .= '<div style="text-align:center"><img src="' . WPLE_URL . '/admin/assets/new-year.png"></div>';
|
747 |
+
$html .= '<div class="wple-upgrade-pro">
|
748 |
+
<a href="' . $compareurl . '" target="_blank" class="wplecompare">' . esc_html__( 'COMPARE FREE & PRO VERSION', 'wp-letsencrypt-ssl' ) . '</a>';
|
749 |
+
// if (isset($_GET['success']) && FALSE == $nopricing) {
|
750 |
+
// $html .= '<a href="' . $upgradeurl . '">' . esc_html__('UPGRADE TO PRO', 'wp-letsencrypt-ssl') . '<span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Requires cPanel or root SSH access"></span></a>
|
751 |
+
// <a href="https://wpencryption.com/#firewall" target="_blank">' . esc_html__('UPGRADE TO FIREWALL', 'wp-letsencrypt-ssl') . '<span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Why buy an SSL alone when you can get Premium SSL + CDN + Firewall Security for even lower cost."></span></a>';
|
752 |
+
// } else {
|
753 |
+
$html .= '<a href="' . $upgradeurl . '">' . esc_html__( 'UPGRADE TO PRO', 'wp-letsencrypt-ssl' ) . '</a>';
|
754 |
+
//$html .= '<a href="https://checkout.freemius.com/mode/dialog/plugin/5090/plan/10643/" target="_blank" id="upgradetocdn">' . esc_html__('UPGRADE TO CDN', 'wp-letsencrypt-ssl') . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Sky rocket your WordPress site performance with Fastest Content Delivery Network + Premium Sectigo SSL"></span></a>';
|
755 |
+
// }
|
756 |
+
$html .= '</div>';
|
757 |
+
// $rnd = rand(0, 1);
|
758 |
+
// if ($rnd) {
|
759 |
+
// $html .= '<div class="wple-hire-expert"><a href="https://wpencryption.com/cdn-firewall/?utm_campaign=wpencryptionsite&utm_medium=checkoutcdn&utm_source=upgradeblock" target="_blank">Sky Rocket your site speed with our <strong>CDN</strong> plan (<strong>Includes SSL + Performance</strong>) <span class="dashicons dashicons-external"></span></a></div>';
|
760 |
+
// } else {
|
761 |
+
// $html .= '<div class="wple-hire-expert"><a href="https://wpencryption.com/hire-ssl-expert/?utm_campaign=wpencryptionsite&utm_medium=hiresslexpert&utm_source=upgradeblock" target="_blank">Too busy? <b>Hire an expert</b> for secure migration to HTTPS (<b>ONE YEAR PRO LICENSE FREE</b>) <span class="dashicons dashicons-external"></span></a></div>';
|
762 |
+
// }
|
763 |
+
$html .= '</div><!--wple-upgradepro-->';
|
764 |
+
}
|
765 |
+
|
766 |
+
/**
|
767 |
+
* Success Message block
|
768 |
+
*
|
769 |
+
* @param string $html
|
770 |
+
* @since 2.5.0
|
771 |
+
* @return void
|
772 |
+
*/
|
773 |
+
public function wple_success_block( &$html )
|
774 |
+
{
|
775 |
+
//since 2.4.0
|
776 |
+
|
777 |
+
if ( isset( $_GET['success'] ) ) {
|
778 |
+
$this->wple_wellknown_htaccess();
|
779 |
+
update_option( 'wple_error', 5 );
|
780 |
+
//all success
|
781 |
+
$html .= '
|
782 |
+
<div id="wple-sslgenerator">
|
783 |
+
<div class="wple-success-form">';
|
784 |
+
if ( !isset( $_GET['resume'] ) && !isset( $_GET['nossl'] ) ) {
|
785 |
+
$this->wple_send_success_mail();
|
786 |
+
}
|
787 |
+
$html .= '<h2><span class="dashicons dashicons-yes"></span> ' . WPLE_Trait::wple_kses( __( '<b>Congrats! SSL Certificate have been successfully generated.</b>', 'wp-letsencrypt-ssl' ) ) . '</h2>
|
788 |
+
<h3 style="width: 87%; margin: 0px auto; color: #7b8279; font-weight:400;">' . WPLE_Trait::wple_kses( __( 'We just completed major task of generating SSL certificate! Now we have ONE final step to complete.', 'wp-letsencrypt-ssl' ) ) . '</h3>';
|
789 |
+
$html .= WPLE_Trait::wple_progress_bar();
|
790 |
+
$nopricing = get_option( 'wple_no_pricing' );
|
791 |
+
//$colclass = FALSE != $nopricing ? 'wple-three-cols' : '';
|
792 |
+
$html .= '
|
793 |
+
|
794 |
+
<div class="wple-success-flex">
|
795 |
+
<div class="wple-success-flex-video">
|
796 |
+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/aKvvVlAlZ14" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
797 |
+
</div>
|
798 |
+
<div class="wple-success-flex-final">
|
799 |
+
<ul class="download-ssl-certs">
|
800 |
+
<li>1. ' . sprintf( __( '%sClick here%s to login into your cPanel.', 'wp-letsencrypt-ssl' ), '<a href="' . site_url( 'cpanel' ) . '" target="_blank">', '</a>' ) . '</li>
|
801 |
+
<li>2. ' . sprintf( __( 'Open %sSSL/TLS%s option on your cPanel', 'wp-letsencrypt-ssl' ), '<strong><img src="' . WPLE_URL . '/admin/assets/tls.png" style="width: 20px;margin-bottom: -5px;"> ', '</strong>' ) . '</li>
|
802 |
+
<li>3. ' . sprintf( __( 'Click on %sManage SSL Sites%s option', 'wp-letsencrypt-ssl' ), '<strong>', '</strong>' ) . '</li>
|
803 |
+
<li>4. ' . sprintf(
|
804 |
+
__( 'Copy the contents of %sCertificate.crt%s, %sPrivate.pem%s, %sCABundle.crt%s files from below & paste them into its appropriate fields on cPanel', 'wp-letsencrypt-ssl' ),
|
805 |
+
'<strong>',
|
806 |
+
'</strong>',
|
807 |
+
'<strong>',
|
808 |
+
'</strong>',
|
809 |
+
'<strong>',
|
810 |
+
'</strong>'
|
811 |
+
) . '. ' . esc_html( "You can also download the cert files to your local computer, right click > open with notepad to view/copy", "wp-letsencrypt-ssl" ) . '</li>
|
812 |
+
<li>';
|
813 |
+
WPLE_Trait::wple_copy_and_download( $html );
|
814 |
+
$html .= '</li>
|
815 |
+
<li>5. ' . sprintf( __( 'Click on %sInstall certificate%s', 'wp-letsencrypt-ssl' ), '<strong>', '</strong>' ) . '</li>
|
816 |
+
<li>6. ' . sprintf( __( 'Please wait few minutes and click on %sEnable HTTPS Now%s button', 'wp-letsencrypt-ssl' ), '<strong>', '</strong>' ) . '</li>
|
817 |
+
</ul>
|
818 |
+
|
819 |
+
</div>
|
820 |
+
</div>
|
821 |
+
|
822 |
+
<div class="wple-success-cols wple-three-cols">
|
823 |
+
<div>
|
824 |
+
<h3>' . esc_html__( "Don't have cPanel?", 'wp-letsencrypt-ssl' ) . '</h3>
|
825 |
+
<p>' . esc_html__( "cPanel link goes to 404 not found page?. ", 'wp-letsencrypt-ssl' ) . sprintf(
|
826 |
+
__( 'If you have root SSH access, edit your server config file and point your SSL paths to %scertificate.crt%s & %sprivate.pem%s files in %skeys/%s folder. Alternatively, Upgrade to %sPRO%s version for automatic SSL installation and automatic SSL renewal.', 'wp-letsencrypt-ssl' ),
|
827 |
+
'<strong>',
|
828 |
+
'</strong>',
|
829 |
+
'<strong>',
|
830 |
+
'</strong>',
|
831 |
+
'<strong>',
|
832 |
+
'</strong>',
|
833 |
+
'<a href="' . admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=annual&pricing_id=7965¤cy=usd' ) . '"><strong>',
|
834 |
+
'</strong></a>'
|
835 |
+
) . '</p>
|
836 |
+
</div>
|
837 |
+
<div>
|
838 |
+
<h3>' . esc_html__( "Test SSL Installation", 'wp-letsencrypt-ssl' ) . '</h3>
|
839 |
+
<p>' . esc_html__( "After installing SSL certs on your cPanel, open your site in https:// and click on padlock to see if valid certificate exists. You can also test your site's SSL on SSLLabs.com", "wp-letsencrypt-ssl" ) . '</p>
|
840 |
+
</div>
|
841 |
+
<div>
|
842 |
+
<h3>' . esc_html__( "By Clicking Enable HTTPS", 'wp-letsencrypt-ssl' ) . '</h3>
|
843 |
+
<p>' . esc_html__( 'Your site & admin url will be changed to https:// and all assets, js, css, images will strictly load over https:// to avoid mixed content errors.', 'wp-letsencrypt-ssl' ) . '</p>
|
844 |
+
</div>';
|
845 |
+
// if (FALSE == $nopricing) {
|
846 |
+
// $html .= '<div>
|
847 |
+
// <h3>' . esc_html__("Looking for instant SSL solution?", 'wp-letsencrypt-ssl') . '</h3>
|
848 |
+
// <p>' . sprintf(__('Why pay for an SSL certificate alone when you can get %sPremium Sectigo SSL%s + %sCDN Performance%s + %sSecurity Firewall%s for even lower cost with our %sCDN%s Service.', 'wp-letsencrypt-ssl'), '<strong>', '</strong>', '<strong>', '</strong>', '<strong>', '</strong>', '<a href="https://wpencryption.com/cdn-firewall/?utm_campaign=wpencryption&utm_source=wordpress&utm_medium=gocdn" target="_blank">', '</a>') . '!.</p>
|
849 |
+
// </div>';
|
850 |
+
// }
|
851 |
+
$html .= '</div>
|
852 |
+
|
853 |
+
<ul>
|
854 |
+
<!--<li>' . WPLE_Trait::wple_kses( __( '<b>Note:</b> Use below "Enable HTTPS" button ONLY after SSL certificate is successfully installed on your cPanel', 'wp-letsencrypt-ssl' ) ) . '</li>-->
|
855 |
+
</ul>';
|
856 |
+
if ( isset( $_GET['nossl'] ) ) {
|
857 |
+
$html .= '<h3 style="color:#ff4343;margin-bottom:10px;">' . esc_html__( 'We could not detect valid SSL certificate installed on your site!. Please try after some time. You can also try opening wp-admin via https:// and click on enable https button.', 'wp-letsencrypt-ssl' ) . '</h3>
|
858 |
+
<p>' . esc_html__( 'Switching to HTTPS without properly installing the SSL certificate might break your site.', 'wp-letsencrypt-ssl' ) . '</p>';
|
859 |
+
}
|
860 |
+
$html .= '<form method="post">
|
861 |
+
' . wp_nonce_field(
|
862 |
+
'wplehttps',
|
863 |
+
'sslready',
|
864 |
+
false,
|
865 |
+
false
|
866 |
+
) . '
|
867 |
+
<button type="submit" name="wple-https">' . esc_html__( 'ENABLE HTTPS NOW', 'wp-letsencrypt-ssl' ) . '</button>
|
868 |
+
</form>
|
869 |
+
</div>
|
870 |
+
</div><!--wple-sslgenerator-->';
|
871 |
+
}
|
872 |
+
|
873 |
+
}
|
874 |
+
|
875 |
+
/**
|
876 |
+
* Show pending challenges
|
877 |
+
*
|
878 |
+
* @return void
|
879 |
+
*/
|
880 |
+
public function wple_domain_verification()
|
881 |
+
{
|
882 |
+
//since 5.1.0
|
883 |
+
|
884 |
+
if ( isset( $_GET['restart'] ) ) {
|
885 |
+
delete_option( 'wple_error' );
|
886 |
+
delete_option( 'wple_complete' );
|
887 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption' ), 302 );
|
888 |
+
exit;
|
889 |
+
}
|
890 |
+
|
891 |
+
|
892 |
+
if ( isset( $_GET['complete'] ) ) {
|
893 |
+
//Forced SSL completion flag
|
894 |
+
delete_option( 'wple_error' );
|
895 |
+
update_option( 'wple_complete', 1 );
|
896 |
+
update_option( 'wple_backend', 1 );
|
897 |
+
if ( wp_next_scheduled( 'wple_ssl_renewal' ) ) {
|
898 |
+
wp_clear_scheduled_hook( 'wple_ssl_renewal' );
|
899 |
+
}
|
900 |
+
///echo "SSL Setup Completed!";
|
901 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption' ), 302 );
|
902 |
+
exit;
|
903 |
+
}
|
904 |
+
|
905 |
+
$estage = get_option( 'wple_error' );
|
906 |
+
|
907 |
+
if ( FALSE !== $estage && $estage == 2 && !isset( $_GET['subdir'] ) && !isset( $_GET['error'] ) && !isset( $_GET['includewww'] ) && !isset( $_GET['wpleauto'] ) && isset( $_GET['page'] ) && $_GET['page'] == 'wp_encryption' && !isset( $_GET['success'] ) && !isset( $_GET['wplereset'] ) && !isset( $_GET['comparison'] ) && !isset( $_GET['lasterror'] ) ) {
|
908 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption&subdir=1' ), 302 );
|
909 |
+
exit;
|
910 |
+
}
|
911 |
+
|
912 |
+
|
913 |
+
if ( FALSE !== $estage && $estage == 5 && !isset( $_GET['subdir'] ) && !isset( $_GET['error'] ) && !isset( $_GET['includewww'] ) && !isset( $_GET['wpleauto'] ) && isset( $_GET['page'] ) && $_GET['page'] == 'wp_encryption' && !isset( $_GET['resume'] ) && !isset( $_GET['nossl'] ) && !isset( $_GET['wplereset'] ) && !isset( $_GET['comparison'] ) && !isset( $_GET['nocpanel'] ) ) {
|
914 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption&success=1&resume=1' ), 302 );
|
915 |
+
exit;
|
916 |
+
}
|
917 |
+
|
918 |
+
}
|
919 |
+
|
920 |
+
/**
|
921 |
+
* Error Message block
|
922 |
+
*
|
923 |
+
* @param string $html
|
924 |
+
* @since 2.5.0
|
925 |
+
* @return void
|
926 |
+
*/
|
927 |
+
public function wple_error_block( &$html )
|
928 |
+
{
|
929 |
+
if ( !isset( $_GET['subdir'] ) && !isset( $_GET['success'] ) ) {
|
930 |
+
|
931 |
+
if ( isset( $_GET['sperror'] ) ) {
|
932 |
+
} else {
|
933 |
+
|
934 |
+
if ( isset( $_GET['error'] ) || FALSE != ($error_code = get_option( 'wple_error' )) ) {
|
935 |
+
$error_code = get_option( 'wple_error' );
|
936 |
+
$generic = esc_html__( 'There was some issue while generating SSL for your site. Please check debug log or try Reset option once.', 'wp-letsencrypt-ssl' );
|
937 |
+
$generic .= '<p style="font-size:16px;color:#888">' . sprintf( esc_html__( 'Feel free to open support ticket at %s for any help.', 'wp-letsencrypt-ssl' ), 'https://wordpress.org/support/plugin/wp-letsencrypt-ssl/#new-topic-0' ) . '</p>';
|
938 |
+
$firerec = sprintf(
|
939 |
+
esc_html__( "We highly recommend upgrading to our %sPRO%s annual plan for %sPremium SSL%s with automatic %sCDN%s + %sFirewall Security%s that works on ANY host.", 'wp-letsencrypt-ssl' ),
|
940 |
+
'<a href="' . admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=annual&pricing_id=7965¤cy=usd' ) . '">',
|
941 |
+
'</a>',
|
942 |
+
'<strong>',
|
943 |
+
'</strong>',
|
944 |
+
'<strong>',
|
945 |
+
'</strong>',
|
946 |
+
'<strong>',
|
947 |
+
'</strong>'
|
948 |
+
);
|
949 |
+
$thirdparty = esc_html__( "Your hosting server don't seem to support third party SSL.", "wp-letsencrypt-ssl" );
|
950 |
+
|
951 |
+
if ( FALSE !== $error_code && ($error_code == 1 || $error_code == 400) ) {
|
952 |
+
$generic .= '<p class="firepro">' . $thirdparty . ' ' . $firerec . '</p>';
|
953 |
+
} else {
|
954 |
+
if ( file_exists( ABSPATH . 'keys/certificate.crt' ) ) {
|
955 |
+
$generic .= '<br><br>' . WPLE_Trait::wple_kses( __( 'You already seem to have certificate generated and stored. Please try downloading certs from <strong>Download SSL Certificates</strong> page and open in a text editor like notepad to check if certificate is not empty.', 'wp-letsencrypt-ssl' ) );
|
956 |
+
}
|
957 |
+
}
|
958 |
+
|
959 |
+
|
960 |
+
if ( FALSE !== $error_code && $error_code == 429 ) {
|
961 |
+
$generic = sprintf( esc_html__( 'Too many registration attempts from your IP address (%s). Please try after 2-3 hours.', 'wp-letsencrypt-ssl' ), 'https://letsencrypt.org/docs/rate-limits/' );
|
962 |
+
$generic .= '<p class="firepro">' . $firerec . '</p>';
|
963 |
+
$generic .= '<p style="font-size:17px;color:#888">' . sprintf( esc_html__( 'Feel free to open support ticket at %s for any help.', 'wp-letsencrypt-ssl' ), 'https://wordpress.org/support/plugin/wp-letsencrypt-ssl/#new-topic-0' ) . '</p>';
|
964 |
+
}
|
965 |
+
|
966 |
+
if ( $error_code != 5 ) {
|
967 |
+
$html .= '
|
968 |
+
<div id="wple-sslgenerator" class="error">
|
969 |
+
<div class="wple-error-message">
|
970 |
+
' . $generic . '
|
971 |
+
</div>
|
972 |
+
</div><!--wple-sslgenerator-->';
|
973 |
+
}
|
974 |
+
}
|
975 |
+
|
976 |
+
}
|
977 |
+
|
978 |
+
}
|
979 |
+
}
|
980 |
+
|
981 |
+
/**
|
982 |
+
* Send email to user on success
|
983 |
+
*
|
984 |
+
* @since 3.0.0
|
985 |
+
*/
|
986 |
+
private function wple_send_success_mail()
|
987 |
+
{
|
988 |
+
$opts = get_option( 'wple_opts' );
|
989 |
+
$to = sanitize_email( $opts['email'] );
|
990 |
+
$subject = esc_html__( 'Congratulations! Your SSL certificates have been generated using WP Encryption Plugin', 'wp-letsencrypt-ssl' );
|
991 |
+
$headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
992 |
+
$body = '<h3>' . esc_html__( 'You are just ONE step behind enabling HTTPS for your WordPress site', 'wp-letsencrypt-ssl' ) . '</h3>';
|
993 |
+
$body .= '<p>' . esc_html__( 'Download the generated SSL certificates from below given links and install it on your cPanel following the video tutorial', 'wp-letsencrypt-ssl' ) . ' (https://youtu.be/KQ2HYtplPEk). ' . esc_html__( 'These certificates expires on', 'wp-letsencrypt-ssl' ) . ' <b>' . esc_html( $opts['expiry'] ) . '</b></p>
|
994 |
+
<br/>
|
995 |
+
<a href="' . admin_url( '/admin.php?page=wp_encryption&le=1', 'http' ) . '" style="background: #0073aa; text-decoration: none; color: #fff; padding: 12px 20px; display: inline-block; margin: 10px 10px 10px 0; font-weight: bold;">' . esc_html__( 'Download Cert File', 'wp-letsencrypt-ssl' ) . '</a>
|
996 |
+
<a href="' . admin_url( '/admin.php?page=wp_encryption&le=2', 'http' ) . '" style="background: #0073aa; text-decoration: none; color: #fff; padding: 12px 20px; display: inline-block; margin: 10px; font-weight: bold;">' . esc_html__( 'Download Key File', 'wp-letsencrypt-ssl' ) . '</a>
|
997 |
+
<a href="' . admin_url( '/admin.php?page=wp_encryption&le=3', 'http' ) . '" style="background: #0073aa; text-decoration: none; color: #fff; padding: 12px 20px; display: inline-block; margin: 10px; font-weight: bold;">' . esc_html__( 'Download CA File', 'wp-letsencrypt-ssl' ) . '</a>
|
998 |
+
<br/>';
|
999 |
+
///if (FALSE == get_option('wple_no_pricing')) {
|
1000 |
+
$body .= '<br /><br />';
|
1001 |
+
$body .= '<b>' . esc_html__( 'WP Encryption PRO can automate this entire process in one click including SSL installation on cPanel hosting and auto renewal of certificates every 90 days', 'wp-letsencrypt-ssl' ) . '!. <br><a href="' . admin_url( '/admin.php?page=wp_encryption-pricing', 'http' ) . '" style="background: #0073aa; text-decoration: none; color: #fff; padding: 12px 20px; display: inline-block; margin: 10px 0; font-weight: bold;">' . esc_html__( 'UPGRADE TO PREMIUM', 'wp-letsencrypt-ssl' ) . '</a></b><br /><br />';
|
1002 |
+
$body .= "<h3>" . esc_html__( "Don't have cPanel hosting?", 'wp-letsencrypt-ssl' ) . "</h3>";
|
1003 |
+
$body .= '<p>We don\'t wanna disappoint you!. Opt for our <a href="' . admin_url( '/admin.php?page=wp_encryption-pricing', 'http' ) . '"><strong>Annual Pro plan</strong><a> and setup SSL for your site hosted on ANY hosting platform including Managed WordPress platforms.' . WPLE_Trait::wple_kses( __( 'With free version, You can download and send these SSL certificates to your hosting support asking them to install these SSL certificates.', 'wp-letsencrypt-ssl' ) ) . '</p><br /><br />';
|
1004 |
+
///}
|
1005 |
+
wp_mail(
|
1006 |
+
$to,
|
1007 |
+
$subject,
|
1008 |
+
$body,
|
1009 |
+
$headers
|
1010 |
+
);
|
1011 |
+
}
|
1012 |
+
|
1013 |
+
/**
|
1014 |
+
* Handles review box actions
|
1015 |
+
*
|
1016 |
+
* @since 4.4.0
|
1017 |
+
* @return void
|
1018 |
+
*/
|
1019 |
+
public function wple_review_handler()
|
1020 |
+
{
|
1021 |
+
//since 5.0.0
|
1022 |
+
$this->wple_intro_pricing_handler();
|
1023 |
+
}
|
1024 |
+
|
1025 |
+
/**
|
1026 |
+
* Sets review flag to show review request
|
1027 |
+
*
|
1028 |
+
* @since 4.4.0
|
1029 |
+
*/
|
1030 |
+
public function wple_set_review_flag()
|
1031 |
+
{
|
1032 |
+
update_option( 'wple_show_review', 1 );
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
/**
|
1036 |
+
* Handle the reset keys action
|
1037 |
+
*
|
1038 |
+
* @since 4.5.0
|
1039 |
+
* @return void
|
1040 |
+
*/
|
1041 |
+
public function wple_reset_handler()
|
1042 |
+
{
|
1043 |
+
|
1044 |
+
if ( isset( $_GET['wplereset'] ) ) {
|
1045 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
1046 |
+
exit( 'No Trespassing Allowed' );
|
1047 |
+
}
|
1048 |
+
if ( !wp_verify_nonce( $_GET['wplereset'], 'restartwple' ) ) {
|
1049 |
+
exit( 'No Trespassing Allowed' );
|
1050 |
+
}
|
1051 |
+
$keys = ABSPATH . 'keys/';
|
1052 |
+
$files = array(
|
1053 |
+
$keys . 'public.pem',
|
1054 |
+
$keys . 'private.pem',
|
1055 |
+
$keys . 'order',
|
1056 |
+
$keys . 'fullchain.crt',
|
1057 |
+
$keys . 'certificate.crt',
|
1058 |
+
$keys . '__account/private.pem',
|
1059 |
+
$keys . '__account/public.pem'
|
1060 |
+
);
|
1061 |
+
foreach ( $files as $file ) {
|
1062 |
+
if ( file_exists( $file ) ) {
|
1063 |
+
unlink( $file );
|
1064 |
+
}
|
1065 |
+
}
|
1066 |
+
delete_option( 'wple_error' );
|
1067 |
+
delete_option( 'wple_complete' );
|
1068 |
+
delete_option( 'wple_backend' );
|
1069 |
+
///if (wple_fs()->can_use_premium_code__premium_only()) {
|
1070 |
+
delete_option( 'wple_firewall_stage' );
|
1071 |
+
delete_option( 'wple_spmode_dns' );
|
1072 |
+
delete_option( 'wple_spmode_activated' );
|
1073 |
+
///}
|
1074 |
+
add_action( 'admin_notices', array( $this, 'wple_reset_success' ) );
|
1075 |
+
}
|
1076 |
+
|
1077 |
+
//since 4.6.0
|
1078 |
+
|
1079 |
+
if ( isset( $_GET['wplesslrenew'] ) ) {
|
1080 |
+
if ( !wp_verify_nonce( $_GET['wplesslrenew'], 'wple_renewed' ) ) {
|
1081 |
+
exit( 'Unauthorized' );
|
1082 |
+
}
|
1083 |
+
delete_option( 'wple_show_reminder' );
|
1084 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption' ), 302 );
|
1085 |
+
}
|
1086 |
+
|
1087 |
+
}
|
1088 |
+
|
1089 |
+
/**
|
1090 |
+
* Reset success notice
|
1091 |
+
*
|
1092 |
+
* @since 4.5.0
|
1093 |
+
*/
|
1094 |
+
public function wple_reset_success()
|
1095 |
+
{
|
1096 |
+
echo '<div class="notice notice-success is-dismissable">
|
1097 |
+
<p>' . esc_html( 'Reset successful!. You can start with the SSL install process again.', 'wp-letsencrypt-ssl' ) . '</p>
|
1098 |
+
</div>' ;
|
1099 |
+
}
|
1100 |
+
|
1101 |
+
/**
|
1102 |
+
* Local check DNS records via Ajax
|
1103 |
+
*
|
1104 |
+
* @since 4.6.0
|
1105 |
+
* @return void
|
1106 |
+
*/
|
1107 |
+
public function wple_ajx_verify_dns()
|
1108 |
+
{
|
1109 |
+
|
1110 |
+
if ( isset( $_POST['nc'] ) ) {
|
1111 |
+
if ( !wp_verify_nonce( $_POST['nc'], 'verifydnsrecords' ) ) {
|
1112 |
+
exit( 'Unauthorized' );
|
1113 |
+
}
|
1114 |
+
$toVerify = get_option( 'wple_opts' );
|
1115 |
+
|
1116 |
+
if ( array_key_exists( 'dns_challenges', $toVerify ) && !empty($toVerify['dns_challenges']) ) {
|
1117 |
+
$toVerify = $dnspendings = $toVerify['dns_challenges'];
|
1118 |
+
//array
|
1119 |
+
foreach ( $toVerify as $index => $item ) {
|
1120 |
+
$domain_code = explode( '||', $item );
|
1121 |
+
$acme = '_acme-challenge.' . esc_html( $domain_code[0] );
|
1122 |
+
$requestURL = 'https://dns.google.com/resolve?name=' . addslashes( $acme ) . '&type=TXT';
|
1123 |
+
$handle = curl_init();
|
1124 |
+
curl_setopt( $handle, CURLOPT_URL, $requestURL );
|
1125 |
+
curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true );
|
1126 |
+
curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
|
1127 |
+
$response = json_decode( trim( curl_exec( $handle ) ) );
|
1128 |
+
|
1129 |
+
if ( $response->Status === 0 && isset( $response->Answer ) ) {
|
1130 |
+
//if ($answer->type == 16) {
|
1131 |
+
$found = 'Pending';
|
1132 |
+
foreach ( $response->Answer as $answer ) {
|
1133 |
+
$livecode = str_ireplace( '"', '', $answer->data );
|
1134 |
+
|
1135 |
+
if ( $livecode == $domain_code[1] ) {
|
1136 |
+
unset( $dnspendings[$index] );
|
1137 |
+
$found = 'OK';
|
1138 |
+
}
|
1139 |
+
|
1140 |
+
}
|
1141 |
+
WPLE_Trait::wple_logger( "\n" . esc_html( $requestURL . ' should return ' . $domain_code[1] . ' -> ' . $found ) . "\n" );
|
1142 |
+
} else {
|
1143 |
+
$ledebug = WPLE_Trait::wple_lets_debug( 'dns-01' );
|
1144 |
+
|
1145 |
+
if ( $ledebug != false ) {
|
1146 |
+
echo $ledebug ;
|
1147 |
+
exit;
|
1148 |
+
}
|
1149 |
+
|
1150 |
+
echo 'fail' ;
|
1151 |
+
exit;
|
1152 |
+
}
|
1153 |
+
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
if ( empty($dnspendings) ) {
|
1157 |
+
WPLE_Trait::wple_logger(
|
1158 |
+
"Local check - All DNS challenges verified\n",
|
1159 |
+
'success',
|
1160 |
+
'a',
|
1161 |
+
false
|
1162 |
+
);
|
1163 |
+
echo 1 ;
|
1164 |
+
exit;
|
1165 |
+
} else {
|
1166 |
+
$ledebug = WPLE_Trait::wple_lets_debug( 'dns-01' );
|
1167 |
+
|
1168 |
+
if ( $ledebug != false ) {
|
1169 |
+
echo $ledebug ;
|
1170 |
+
exit;
|
1171 |
+
}
|
1172 |
+
|
1173 |
+
echo 'fail' ;
|
1174 |
+
exit;
|
1175 |
+
}
|
1176 |
+
|
1177 |
+
} else {
|
1178 |
+
|
1179 |
+
if ( empty($toVerify['dns_challenges']) ) {
|
1180 |
+
WPLE_Trait::wple_logger(
|
1181 |
+
"Local check - DNS challenges empty\n",
|
1182 |
+
'success',
|
1183 |
+
'a',
|
1184 |
+
false
|
1185 |
+
);
|
1186 |
+
echo 1 ;
|
1187 |
+
exit;
|
1188 |
+
}
|
1189 |
+
|
1190 |
+
}
|
1191 |
+
|
1192 |
+
}
|
1193 |
+
|
1194 |
+
echo 'fail' ;
|
1195 |
+
exit;
|
1196 |
+
}
|
1197 |
+
|
1198 |
+
/**
|
1199 |
+
* Show expiry reminder in admin notice
|
1200 |
+
*
|
1201 |
+
* @see 4.6.0
|
1202 |
+
* @return void
|
1203 |
+
*/
|
1204 |
+
public function wple_start_show_reminder()
|
1205 |
+
{
|
1206 |
+
update_option( 'wple_show_reminder', 1 );
|
1207 |
+
$opts = get_option( 'wple_opts' );
|
1208 |
+
$to = sanitize_email( $opts['email'] );
|
1209 |
+
$subject = sprintf( esc_html__( 'ATTENTION - SSL Certificate of %s expires in just 10 days', 'wp-letsencrypt-ssl' ), str_ireplace( array( 'https://', 'http://' ), array( '', '' ), site_url() ) );
|
1210 |
+
$headers = array( 'Content-Type: text/html; charset=UTF-8' );
|
1211 |
+
$body = '<p>' . sprintf( esc_html__( 'Your SSL Certificate is expiring soon!. Please make sure to re-generate new SSL Certificate using %sWP Encryption%s and install it on your hosting server to avoid site showing insecure warning with expired certificate.', 'wp-letsencrypt-ssl' ), '<a href="' . admin_url( '/admin.php?page=wp_encryption', 'http' ) . '">', '</a>' ) . '</p><br /><br />';
|
1212 |
+
$body .= '<b>' . esc_html__( 'Tired of manual SSL renewal?, Upgrade to PRO version for automatic SSL installation and automatic SSL renewal', 'wp-letsencrypt-ssl' ) . '. <br><a href="' . admin_url( '/admin.php?page=wp_encryption-pricing', 'http' ) . '" style="background: #0073aa; text-decoration: none; color: #fff; padding: 12px 20px; display: inline-block; margin: 10px 0; font-weight: bold;">' . esc_html__( 'UPGRADE TO PREMIUM', 'wp-letsencrypt-ssl' ) . '</a></b><br /><br />';
|
1213 |
+
wp_mail(
|
1214 |
+
$to,
|
1215 |
+
$subject,
|
1216 |
+
$body,
|
1217 |
+
$headers
|
1218 |
+
);
|
1219 |
+
}
|
1220 |
+
|
1221 |
+
public function wple_reminder_notice()
|
1222 |
+
{
|
1223 |
+
$already_did = wp_nonce_url( admin_url( 'admin.php?page=wp_encryption' ), 'wple_renewed', 'wplesslrenew' );
|
1224 |
+
$html = '<div class="notice notice-info wple-admin-review">
|
1225 |
+
<div class="wple-review-box wple-reminder-notice">
|
1226 |
+
<img src="' . WPLE_URL . 'admin/assets/symbol.png"/>
|
1227 |
+
<span><strong>WP ENCRYPTION: ' . esc_html__( 'Your SSL certificate expires in less than 10 days', 'wp-letsencrypt-ssl' ) . '</strong><p>' . WPLE_Trait::wple_kses( __( 'Renew your SSL certificate today to avoid your site from showing as insecure. Please support our contribution by upgrading to <strong>Pro</strong> and avail automatic renewal with automatic installation.', 'wp-letsencrypt-ssl' ) ) . '</p></span>
|
1228 |
+
</div>
|
1229 |
+
<a class="wple-lets-review wplerevbtn" href="' . admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=lifetime&pricing_id=7965¤cy=usd' ) . '">' . esc_html__( 'Upgrade to Pro', 'wp-letsencrypt-ssl' ) . '</a>
|
1230 |
+
<a class="already-renewed wplerevbtn" href="' . $already_did . '">' . esc_html__( 'I already renewed', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-smiley"></span></a>
|
1231 |
+
</div>';
|
1232 |
+
echo $html ;
|
1233 |
+
}
|
1234 |
+
|
1235 |
+
/**
|
1236 |
+
* Manual HTTP challenges for subdir sites
|
1237 |
+
*
|
1238 |
+
* @since 4.7.0
|
1239 |
+
* @param string $html
|
1240 |
+
* @param array $opts
|
1241 |
+
* @return string
|
1242 |
+
*/
|
1243 |
+
public function wple_subdir_challenges( &$html, $opts )
|
1244 |
+
{
|
1245 |
+
if ( isset( $_GET['subdir'] ) ) {
|
1246 |
+
$html .= '
|
1247 |
+
<div id="wple-sslgenerator">
|
1248 |
+
<div class="wple-success-form">
|
1249 |
+
' . WPLE_Subdir_Challenge_Helper::show_challenges( $opts ) . '
|
1250 |
+
</div>
|
1251 |
+
</div><!--wple-sslgenerator-->';
|
1252 |
+
}
|
1253 |
+
}
|
1254 |
+
|
1255 |
+
/**
|
1256 |
+
* Local check HTTP records via Ajax for subdir sites
|
1257 |
+
*
|
1258 |
+
* @since 4.7.0
|
1259 |
+
* @return void
|
1260 |
+
*/
|
1261 |
+
public function wple_ajx_verify_http()
|
1262 |
+
{
|
1263 |
+
|
1264 |
+
if ( isset( $_POST['nc'] ) ) {
|
1265 |
+
if ( !wp_verify_nonce( $_POST['nc'], 'verifyhttprecords' ) ) {
|
1266 |
+
exit( 'Unauthorized' );
|
1267 |
+
}
|
1268 |
+
$domain = str_ireplace( array( 'https://', 'http://' ), '', site_url() );
|
1269 |
+
if ( stripos( $domain, '/' ) != FALSE ) {
|
1270 |
+
//subdir site
|
1271 |
+
$domain = substr( $domain, 0, stripos( $domain, '/' ) );
|
1272 |
+
}
|
1273 |
+
$opts = get_option( 'wple_opts' );
|
1274 |
+
$httpch = $opts['challenge_files'];
|
1275 |
+
|
1276 |
+
if ( empty($httpch) ) {
|
1277 |
+
echo 1 ;
|
1278 |
+
exit;
|
1279 |
+
}
|
1280 |
+
|
1281 |
+
$counter = get_option( 'wple_failed_verification' );
|
1282 |
+
foreach ( $httpch as $index => $ch ) {
|
1283 |
+
|
1284 |
+
if ( $counter >= 8 ) {
|
1285 |
+
$fpath = ABSPATH . '.well-known/acme-challenge/';
|
1286 |
+
if ( !file_exists( $fpath ) ) {
|
1287 |
+
mkdir( $fpath, 0775, true );
|
1288 |
+
}
|
1289 |
+
WPLE_Trait::wple_logger( 'Helping with HTTP challenge file', 'success', 'a' );
|
1290 |
+
file_put_contents( $fpath . $ch['file'], trim( $ch['value'] ) );
|
1291 |
+
}
|
1292 |
+
|
1293 |
+
$check = LEFunctions::checkHTTPChallenge( $domain, $ch['file'], $ch['value'] );
|
1294 |
+
|
1295 |
+
if ( !$check ) {
|
1296 |
+
|
1297 |
+
if ( FALSE === $counter ) {
|
1298 |
+
update_option( 'wple_failed_verification', 1 );
|
1299 |
+
} else {
|
1300 |
+
update_option( 'wple_failed_verification', $counter + 1 );
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
WPLE_Trait::wple_logger(
|
1304 |
+
"HTTP challenge file checked locally - found invalid",
|
1305 |
+
'success',
|
1306 |
+
'a',
|
1307 |
+
false
|
1308 |
+
);
|
1309 |
+
$ledebug = WPLE_Trait::wple_lets_debug( 'http-01' );
|
1310 |
+
|
1311 |
+
if ( $ledebug != false ) {
|
1312 |
+
echo $ledebug ;
|
1313 |
+
exit;
|
1314 |
+
}
|
1315 |
+
|
1316 |
+
echo 'fail' ;
|
1317 |
+
exit;
|
1318 |
+
}
|
1319 |
+
|
1320 |
+
}
|
1321 |
+
WPLE_Trait::wple_logger(
|
1322 |
+
"Local check - All HTTP challenges verified\n",
|
1323 |
+
'success',
|
1324 |
+
'a',
|
1325 |
+
false
|
1326 |
+
);
|
1327 |
+
delete_option( 'wple_failed_verification' );
|
1328 |
+
echo 1 ;
|
1329 |
+
exit;
|
1330 |
+
}
|
1331 |
+
|
1332 |
+
}
|
1333 |
+
|
1334 |
+
/**
|
1335 |
+
* Continue process on wpleauto param
|
1336 |
+
*
|
1337 |
+
* @return void
|
1338 |
+
*/
|
1339 |
+
public function wple_continue_certification()
|
1340 |
+
{
|
1341 |
+
|
1342 |
+
if ( isset( $_GET['wpleauto'] ) ) {
|
1343 |
+
$leopts = get_option( 'wple_opts' );
|
1344 |
+
|
1345 |
+
if ( $_GET['wpleauto'] == 'http' ) {
|
1346 |
+
new WPLE_Core( $leopts );
|
1347 |
+
} else {
|
1348 |
+
//DNS
|
1349 |
+
new WPLE_Core(
|
1350 |
+
$leopts,
|
1351 |
+
true,
|
1352 |
+
false,
|
1353 |
+
true
|
1354 |
+
);
|
1355 |
+
}
|
1356 |
+
|
1357 |
+
}
|
1358 |
+
|
1359 |
+
}
|
1360 |
+
|
1361 |
+
/**
|
1362 |
+
* Simple success notice for admin
|
1363 |
+
*
|
1364 |
+
* @since 4.7.2
|
1365 |
+
* @return void
|
1366 |
+
*/
|
1367 |
+
public function wple_success_notice()
|
1368 |
+
{
|
1369 |
+
$html = '<div class="notice notice-success">
|
1370 |
+
<p>' . esc_html__( 'Success', 'wp-letsencrypt-ssl' ) . '!</p>
|
1371 |
+
</div>';
|
1372 |
+
echo $html ;
|
1373 |
+
}
|
1374 |
+
|
1375 |
+
/**
|
1376 |
+
* Show Pricing table once on activation
|
1377 |
+
*
|
1378 |
+
* @since 5.0.0
|
1379 |
+
* @param string $html
|
1380 |
+
* @return $html
|
1381 |
+
*/
|
1382 |
+
public function wple_initial_quick_pricing( &$html )
|
1383 |
+
{
|
1384 |
+
$host = site_url();
|
1385 |
+
if ( FALSE != ($slashpos = stripos( $host, '/', 9 )) ) {
|
1386 |
+
$host = substr( $host, 0, $slashpos );
|
1387 |
+
}
|
1388 |
+
$cp = $host . ':2083';
|
1389 |
+
if ( FALSE === stripos( $host, 'https' ) ) {
|
1390 |
+
$cp = $host . ':2082';
|
1391 |
+
}
|
1392 |
+
$response = wp_remote_get( $cp, [
|
1393 |
+
'headers' => [
|
1394 |
+
'Connection' => 'close',
|
1395 |
+
],
|
1396 |
+
'sslverify' => false,
|
1397 |
+
'timeout' => 30,
|
1398 |
+
] );
|
1399 |
+
$cpanel = true;
|
1400 |
+
if ( is_wp_error( $response ) ) {
|
1401 |
+
$cpanel = false;
|
1402 |
+
}
|
1403 |
+
$html .= '<div id="wple-sslgen">';
|
1404 |
+
|
1405 |
+
if ( $cpanel ) {
|
1406 |
+
update_option( 'wple_have_cpanel', 1 );
|
1407 |
+
$html .= $this->wple_cpanel_pricing_table( 1 );
|
1408 |
+
} else {
|
1409 |
+
update_option( 'wple_have_cpanel', 0 );
|
1410 |
+
// if (isset($_SERVER['GD_PHP_HANDLER'])) {
|
1411 |
+
// if ($_SERVER['SERVER_SOFTWARE'] == 'Apache' && isset($_SERVER['GD_PHP_HANDLER']) && $_SERVER['DOCUMENT_ROOT'] == '/var/www') {
|
1412 |
+
$html .= $this->wple_firewall_pricing_table();
|
1413 |
+
// }
|
1414 |
+
// } else {
|
1415 |
+
// $html .= $this->wple_cpanel_pricing_table('');
|
1416 |
+
// }
|
1417 |
+
}
|
1418 |
+
|
1419 |
+
$html .= '</div>';
|
1420 |
+
echo $html ;
|
1421 |
+
}
|
1422 |
+
|
1423 |
+
/**
|
1424 |
+
* Pricing table html
|
1425 |
+
*
|
1426 |
+
* @since 5.0.0
|
1427 |
+
* @return $table
|
1428 |
+
*/
|
1429 |
+
public function wple_cpanel_pricing_table( $cpanel = '' )
|
1430 |
+
{
|
1431 |
+
ob_start();
|
1432 |
+
?>
|
1433 |
+
|
1434 |
+
<h2 class="pricing-intro-head"><?php
|
1435 |
+
esc_html_e( 'SAVE MORE THAN $80+ EVERY YEAR IN SSL CERTIFICATE FEE', 'wp-letsencrypt-ssl' );
|
1436 |
+
?></h2>
|
1437 |
+
|
1438 |
+
<h4 class="pricing-intro-subhead">Purchase once and use for lifetime - Trusted Globally by <b>110,000+</b> WordPress Users (Looking for <a href="<?php
|
1439 |
+
echo admin_url( '/admin.php?page=wp_encryption&gopro=3' ) ;
|
1440 |
+
?>">Annual</a> | <a href="<?php
|
1441 |
+
echo admin_url( '/admin.php?page=wp_encryption&gopro=2' ) ;
|
1442 |
+
?>">Unlimited Sites License?</a>)</h4>
|
1443 |
+
|
1444 |
+
<div style="text-align:center">
|
1445 |
+
<img src="<?php
|
1446 |
+
echo WPLE_URL ;
|
1447 |
+
?>/admin/assets/limited-offer.png" style="max-width:650px" />
|
1448 |
+
</div>
|
1449 |
+
|
1450 |
+
<!-- <div class="plan-toggler" style="margin:60px 0 -20px !important">
|
1451 |
+
<span>Annual</span><label class="toggle">
|
1452 |
+
<input class="toggle-checkbox initplan-switch" type="checkbox" <?php
|
1453 |
+
// if ($cpanel == 1) {
|
1454 |
+
// echo 'checked';
|
1455 |
+
// }
|
1456 |
+
?>>
|
1457 |
+
<div class="toggle-switch"></div>
|
1458 |
+
<span class="toggle-label">Lifetime</span>
|
1459 |
+
</label>
|
1460 |
+
</div> -->
|
1461 |
+
|
1462 |
+
<div id="quick-pricing-table">
|
1463 |
+
<div class="free-pricing-col wplepricingcol">
|
1464 |
+
<div class="quick-pricing-head free">
|
1465 |
+
<h3>FREE</h3>
|
1466 |
+
<large>$0</large>
|
1467 |
+
</div>
|
1468 |
+
<ul>
|
1469 |
+
<li><strong>Manual</strong> domain verification</li>
|
1470 |
+
<li><strong>Manual</strong> SSL installation</li>
|
1471 |
+
<li><strong>Manual</strong> SSL renewal</li>
|
1472 |
+
<li><strong>Mixed</strong> Content Scanner <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Scan your site to detect which insecure assets are causing browser padlock to not show"></span></li>
|
1473 |
+
<li><strong>Expires</strong> in 90 days <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="You will manually need to re-generate SSL certificate every 90 days using WP Encryption"></span></li>
|
1474 |
+
<li><strong>Basic</strong> support</li>
|
1475 |
+
</ul>
|
1476 |
+
<div class="pricing-btn-block">
|
1477 |
+
<a href="<?php
|
1478 |
+
echo admin_url( '/admin.php?page=wp_encryption&gofree=1' ) ;
|
1479 |
+
?>" class="pricingbtn free">Select Plan</a>
|
1480 |
+
</div>
|
1481 |
+
</div>
|
1482 |
+
|
1483 |
+
<div class="pro-pricing-col wplepricingcol proplan">
|
1484 |
+
<div class="quick-pricing-head pro">
|
1485 |
+
<span class="wple-trending">Popular</span>
|
1486 |
+
<h3>PRO</h3>
|
1487 |
+
<div class="quick-price-row">
|
1488 |
+
<large>$49<sup></sup></large>
|
1489 |
+
<small>/lifetime</small>
|
1490 |
+
</div>
|
1491 |
+
</div>
|
1492 |
+
<ul>
|
1493 |
+
<li><strong>Automatic</strong> domain verification</li>
|
1494 |
+
<li><strong>Automatic</strong> SSL installation</li>
|
1495 |
+
<li><strong>Automatic</strong> SSL renewal</li>
|
1496 |
+
<li><strong>Wildcard</strong> SSL support <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="One SSL certificate to cover all your sub-domains"></span></li>
|
1497 |
+
<li><strong>Multisite</strong> mapped domains <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Install SSL for different domains mapped to your multisite network with MU domain mapping plugin"></span></li>
|
1498 |
+
<li><strong>DNS</strong> Automation <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Automatic Domain verification with DNS if HTTP domain verification fails"></span></li>
|
1499 |
+
<li><strong>Never</strong> expires <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Never worry about SSL again - Your SSL certificate will be automatically renewed in background"></span></li>
|
1500 |
+
<li><strong>Priority</strong> support <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="gowebsmarty.in"></span></li>
|
1501 |
+
</ul>
|
1502 |
+
<div class="pricing-btn-block">
|
1503 |
+
<a href="<?php
|
1504 |
+
echo admin_url( '/admin.php?page=wp_encryption&gopro=1' ) ;
|
1505 |
+
?>" class="pricingbtn free">Select Plan</a>
|
1506 |
+
</div>
|
1507 |
+
</div>
|
1508 |
+
|
1509 |
+
</div>
|
1510 |
+
|
1511 |
+
<br />
|
1512 |
+
<?php
|
1513 |
+
if ( $cpanel != '' ) {
|
1514 |
+
?>
|
1515 |
+
<div class="quick-refund-policy">
|
1516 |
+
<strong>7 Days Refund Policy</strong>
|
1517 |
+
<p>We are showing this recommendation because you have cPanel hosting where our PRO plugin is 100% guaranteed to work. Your purchase will be completely refunded if our plugin failed to work on your site.</p>
|
1518 |
+
</div>
|
1519 |
+
<?php
|
1520 |
+
}
|
1521 |
+
?>
|
1522 |
+
|
1523 |
+
<?php
|
1524 |
+
$table = ob_get_clean();
|
1525 |
+
return $table;
|
1526 |
+
}
|
1527 |
+
|
1528 |
+
public function wple_firewall_pricing_table()
|
1529 |
+
{
|
1530 |
+
ob_start();
|
1531 |
+
?>
|
1532 |
+
|
1533 |
+
<h2 class="pricing-intro-head">FLAWLESS SSL SOLUTION FOR LOWEST PRICE EVER</h2>
|
1534 |
+
<h4 class="pricing-intro-subhead">Upgrade to PRO today for <strong>fully automatic SSL</strong> & Get automatic <strong>CDN + Security</strong> for FREE! - Trusted Globally by <b>110,000+</b> WordPress Users <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="A complete bundle worth $360+ PER YEAR!"></span></h4>
|
1535 |
+
|
1536 |
+
<div id="quick-pricing-table" class="non-cpanel-plans">
|
1537 |
+
<div class="free-pricing-col wplepricingcol">
|
1538 |
+
<div class="quick-pricing-head free">
|
1539 |
+
<h3>FREE</h3>
|
1540 |
+
<large>$0</large>
|
1541 |
+
</div>
|
1542 |
+
<ul>
|
1543 |
+
<li><strong>Manual</strong> domain verification</li>
|
1544 |
+
<li><strong>Manual</strong> SSL installation</li>
|
1545 |
+
<li><strong>Manual</strong> SSL renewal <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="You will manually need to re-generate SSL certificate every 90 days using WP Encryption"></span></li>
|
1546 |
+
<li><strong>Basic</strong> support</li>
|
1547 |
+
</ul>
|
1548 |
+
<div class="pricing-btn-block">
|
1549 |
+
<a href="<?php
|
1550 |
+
echo admin_url( '/admin.php?page=wp_encryption&gofree=1' ) ;
|
1551 |
+
?>" class="pricingbtn free">Select Plan</a>
|
1552 |
+
</div>
|
1553 |
+
</div>
|
1554 |
+
|
1555 |
+
<div class="pro-pricing-col wplepricingcol firewallplan">
|
1556 |
+
<div class="quick-pricing-head pro">
|
1557 |
+
<span class="wple-trending">Popular</span>
|
1558 |
+
<h3>PRO</h3>
|
1559 |
+
<div class="quick-price-row">
|
1560 |
+
<large>$29</large>
|
1561 |
+
<small>/year</small>
|
1562 |
+
</div>
|
1563 |
+
</div>
|
1564 |
+
<ul>
|
1565 |
+
<li><strong>Automatic</strong> Domain Verification</li>
|
1566 |
+
<li><strong>Automatic</strong> SSL Installation</li>
|
1567 |
+
<li><strong>Automatic</strong> SSL Renewal</li>
|
1568 |
+
<li><strong>Wildcard</strong> SSL support <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="One SSL certificate to cover all your sub-domains"></span></li>
|
1569 |
+
<li><strong>Multisite</strong> mapped domains <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Install SSL for different domains mapped to your multisite network with MU domain mapping plugin"></span></li>
|
1570 |
+
<li><strong>Automatic</strong> CDN <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Your site is cached and served from 45+ full-scale edge locations worldwide for faster delivery and lowest TTFB thus improving Google pagespeed score"></span></li>
|
1571 |
+
<li><strong>Security</strong> Firewall <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="All your site traffic routed through secure StackPath firewall offering protection against DDOS attacks, XSS, SQL injection, File inclusion, Common WordPress exploits, CSRF, etc.,"></span></li>
|
1572 |
+
<li><strong>100%</strong> Compatible <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="Guaranteed to work on ANY hosting platform"></span></li>
|
1573 |
+
<li><strong>Priority</strong> Support</li>
|
1574 |
+
</ul>
|
1575 |
+
<div class="pricing-btn-block">
|
1576 |
+
<a href="<?php
|
1577 |
+
echo admin_url( '/admin.php?page=wp_encryption&gofirewall=1' ) ;
|
1578 |
+
?>" class="pricingbtn free">Select Plan</a>
|
1579 |
+
</div>
|
1580 |
+
</div>
|
1581 |
+
|
1582 |
+
</div>
|
1583 |
+
<!-- <div class="intro-pricing-refund">
|
1584 |
+
7 days money back guarantee <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="If you are not satisfied with the service within 7 days of purchase, We will refund your purchase no questions asked"></span>
|
1585 |
+
</div> -->
|
1586 |
+
|
1587 |
+
<?php
|
1588 |
+
$table = ob_get_clean();
|
1589 |
+
return $table;
|
1590 |
+
}
|
1591 |
+
|
1592 |
+
/**
|
1593 |
+
* Intro pricing table handler
|
1594 |
+
*
|
1595 |
+
* @since 5.0.0
|
1596 |
+
* @return void
|
1597 |
+
*/
|
1598 |
+
public function wple_intro_pricing_handler()
|
1599 |
+
{
|
1600 |
+
$goplan = '';
|
1601 |
+
|
1602 |
+
if ( isset( $_GET['gofree'] ) ) {
|
1603 |
+
update_option( 'wple_plan_choose', 1 );
|
1604 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption' ), 302 );
|
1605 |
+
exit;
|
1606 |
+
} else {
|
1607 |
+
|
1608 |
+
if ( isset( $_GET['gopro'] ) ) {
|
1609 |
+
update_option( 'wple_plan_choose', 1 );
|
1610 |
+
|
1611 |
+
if ( $_GET['gopro'] == 2 ) {
|
1612 |
+
//unlimited
|
1613 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=annual&pricing_id=10873¤cy=usd' ), 302 );
|
1614 |
+
} else {
|
1615 |
+
|
1616 |
+
if ( $_GET['gopro'] == 3 ) {
|
1617 |
+
//annual
|
1618 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=annual&pricing_id=7965¤cy=usd' ), 302 );
|
1619 |
+
} else {
|
1620 |
+
//single lifetime
|
1621 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=lifetime&pricing_id=7965¤cy=usd' ), 302 );
|
1622 |
+
}
|
1623 |
+
|
1624 |
+
}
|
1625 |
+
|
1626 |
+
exit;
|
1627 |
+
} else {
|
1628 |
+
|
1629 |
+
if ( isset( $_GET['gofirewall'] ) ) {
|
1630 |
+
update_option( 'wple_plan_choose', 1 );
|
1631 |
+
///wp_redirect(admin_url('/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=11394&plan_name=pro&billing_cycle=annual&pricing_id=11717¤cy=usd'), 302);
|
1632 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=annual&pricing_id=7965¤cy=usd' ), 302 );
|
1633 |
+
exit;
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
}
|
1637 |
+
|
1638 |
+
}
|
1639 |
+
|
1640 |
+
}
|
1641 |
+
|
1642 |
+
/**
|
1643 |
+
* After all stages completion
|
1644 |
+
*
|
1645 |
+
* @param string $html
|
1646 |
+
* @return void
|
1647 |
+
*/
|
1648 |
+
public function wple_completed_block( &$html )
|
1649 |
+
{
|
1650 |
+
$html .= WPLE_Trait::wple_progress_bar();
|
1651 |
+
$cert = ABSPATH . 'keys/certificate.crt';
|
1652 |
+
$leopts = get_option( 'wple_opts' );
|
1653 |
+
$future = strtotime( $leopts['expiry'] );
|
1654 |
+
//Future date.
|
1655 |
+
$timefromdb = time();
|
1656 |
+
$timeleft = $future - $timefromdb;
|
1657 |
+
$daysleft = round( $timeleft / 24 / 60 / 60 );
|
1658 |
+
$wple_support = get_option( 'wple_backend' );
|
1659 |
+
$renewtext = esc_html__( 'Click Here To Renew SSL Certificate', 'wp-letsencrypt-ssl' );
|
1660 |
+
$renewlink = '<a href="#" class="letsrenew wple-tooltip disabled" data-tippy="' . esc_html__( 'This renew button will get enabled during last 30 days of current SSL certificate expiry', 'wp-letsencrypt-ssl' ) . ' ' . esc_html__( 'You can also click on STEP 1 in above progress bar to renew/re-generate SSL Certificate again.', 'wp-letsencrypt-ssl' ) . '">' . $renewtext . '</a>';
|
1661 |
+
if ( $daysleft <= 30 ) {
|
1662 |
+
$renewlink = '<a href="' . admin_url( '/admin.php?page=wp_encryption&restart=1' ) . '" class="letsrenew">' . $renewtext . '</a>';
|
1663 |
+
}
|
1664 |
+
if ( $wple_support ) {
|
1665 |
+
//forced completion
|
1666 |
+
$renewlink = '';
|
1667 |
+
}
|
1668 |
+
$headline = esc_html__( 'Woohoo! WP Encryption just saved you $$$ in SSL Certificate Fee.', 'wp-letsencrypt-ssl' );
|
1669 |
+
$sharetitle = urlencode( 'Generated & Installed free SSL certificate using WP ENCRYPTION WordPress plugin within minutes! Thanks for the great plugin' );
|
1670 |
+
$html .= '<div id="wple-completed">
|
1671 |
+
<div class="wple-completed-review">
|
1672 |
+
<h2>' . $headline . '</h2>
|
1673 |
+
<p>' . sprintf(
|
1674 |
+
__( 'Can you please do us a BIG favor by leaving a %s%s%s%s%s rating on WordPress.org', 'wp-letsencrypt-ssl' ),
|
1675 |
+
'<span class="dashicons dashicons-star-filled"></span>',
|
1676 |
+
'<span class="dashicons dashicons-star-filled"></span>',
|
1677 |
+
'<span class="dashicons dashicons-star-filled"></span>',
|
1678 |
+
'<span class="dashicons dashicons-star-filled"></span>',
|
1679 |
+
'<span class="dashicons dashicons-star-filled"></span>'
|
1680 |
+
) . ' <span class="wple-share-success">' . sprintf(
|
1681 |
+
__( "or spread the word on %s %s %s %s", "wp-letsencrypt-ssl" ),
|
1682 |
+
'<a href="https://twitter.com/share?url=https://wpencryption.com&text=' . $sharetitle . '&hashtags=wp_encryption,wordpress_ssl,wordpress_https" target="_blank" title="Twitter" class="tw">T</a>',
|
1683 |
+
'<a href="https://www.facebook.com/sharer.php?u=wpencryption.com" target="_blank" title="Facebook" class="fb">F</a>',
|
1684 |
+
'<a href="https://reddit.com/submit?url=wpencryption.com&title=' . $sharetitle . '" target="_blank" title="Reddit" class="rd">R</a>',
|
1685 |
+
'<a href="https://pinterest.com/pin/create/bookmarklet/?media=https://wpencryption.com/wp-content/uploads/2021/08/banner-772x250-1.png&url=wpencryption.com&description=' . $sharetitle . '" target="_blank" title="Pinterest" class="pt">P</a>'
|
1686 |
+
) . '</span></p>
|
1687 |
+
<a href="https://wordpress.org/support/plugin/wp-letsencrypt-ssl/reviews/#new-post" target="_blank" class="letsrate">' . esc_html__( 'LEAVE A RATING', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-external"></span></a>
|
1688 |
+
' . $renewlink . '
|
1689 |
+
<small>' . esc_html__( 'Just takes a moment', 'wp-letsencrypt-ssl' ) . '</small>
|
1690 |
+
</div>';
|
1691 |
+
if ( file_exists( $cert ) && isset( $leopts['expiry'] ) && !$wple_support ) {
|
1692 |
+
$html .= '<div class="wple-completed-remaining">
|
1693 |
+
<div class="progress--circle progress--' . esc_attr( $daysleft ) . '">
|
1694 |
+
<div class="progress__number"><strong>' . esc_html( $daysleft ) . '</strong><br><small>' . esc_html__( 'Days', 'wp-letsencrypt-ssl' ) . '</small></div>
|
1695 |
+
</div>
|
1696 |
+
<div class="wple-circle-expires">
|
1697 |
+
<strong>' . esc_html__( 'Your current SSL certificate expires on', 'wp-letsencrypt-ssl' ) . ': <br><b>' . esc_html( $leopts['expiry'] ) . '</b></strong>
|
1698 |
+
<p>' . WPLE_Trait::wple_kses( __( "Let's Encrypt® SSL Certificate expires in 90 days by default. You can easily regenerate new SSL certificate using <strong>RENEW SSL CERTIFICATE</strong> option found on left or by clicking on <strong>STEP 1</strong> in progress bar.", "wp-letsencrypt-ssl" ) ) . '<br /><br />' . WPLE_Trait::wple_kses( __( 'Major browsers like Chrome will start showing insecure site warning IF you fail to renew / re-generate certs before this expiry date. <strong>If you are using PRO version - SSL certificates will be auto renewed in background 30 days prior to expiry date.</strong>', 'wp-letsencrypt-ssl' ) ) . ' Please clear your browser cache once.</p>
|
1699 |
+
</div>
|
1700 |
+
</div>';
|
1701 |
+
}
|
1702 |
+
$html .= '</div>';
|
1703 |
+
}
|
1704 |
+
|
1705 |
+
/**
|
1706 |
+
* Make verificiation possible with broken cert
|
1707 |
+
*
|
1708 |
+
* @return void
|
1709 |
+
*/
|
1710 |
+
public function wple_wellknown_htaccess()
|
1711 |
+
{
|
1712 |
+
$dir = ABSPATH . '.well-known/acme-challenge/.htaccess';
|
1713 |
+
|
1714 |
+
if ( !file_exists( $dir ) ) {
|
1715 |
+
$file = @touch( $dir );
|
1716 |
+
} else {
|
1717 |
+
$file = true;
|
1718 |
+
}
|
1719 |
+
|
1720 |
+
|
1721 |
+
if ( is_writable( $dir ) && $file !== FALSE ) {
|
1722 |
+
$ruleset = "<IfModule mod_rewrite.c>" . "\n";
|
1723 |
+
$ruleset .= "RewriteEngine on" . "\n";
|
1724 |
+
$ruleset .= "RewriteCond %{HTTPS} =on [NC]" . "\n";
|
1725 |
+
$ruleset .= "RewriteRule ^(.*)\$ http://%{HTTP_HOST}%{REQUEST_FILENAME} [R=301,L]" . "\n";
|
1726 |
+
$ruleset .= "</IfModule>" . "\n";
|
1727 |
+
insert_with_markers( $dir, 'WP_Encryption', $ruleset );
|
1728 |
+
}
|
1729 |
+
|
1730 |
+
}
|
1731 |
+
|
1732 |
+
/**
|
1733 |
+
* Grouped admin init hooks
|
1734 |
+
*
|
1735 |
+
* @since 5.2.4
|
1736 |
+
* @return void
|
1737 |
+
*/
|
1738 |
+
public function wple_admin_init_hooks()
|
1739 |
+
{
|
1740 |
+
WPLE_Subdir_Challenge_Helper::download_challenge_files();
|
1741 |
+
$this->wple_save_email_generate_certs();
|
1742 |
+
$this->wple_download_files();
|
1743 |
+
$this->wple_review_handler();
|
1744 |
+
$this->wple_reset_handler();
|
1745 |
+
$this->wple_continue_certification();
|
1746 |
+
$this->wple_domain_verification();
|
1747 |
+
//redirects handler
|
1748 |
+
}
|
1749 |
+
|
1750 |
+
/**
|
1751 |
+
* Validate SSL button for non-cpanel
|
1752 |
+
*
|
1753 |
+
* @since 5.2.6
|
1754 |
+
* @return void
|
1755 |
+
*/
|
1756 |
+
public function wple_validate_nocp_ssl()
|
1757 |
+
{
|
1758 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
1759 |
+
exit( 'Unauthorized' );
|
1760 |
+
}
|
1761 |
+
$basedomain = str_ireplace( array( 'http://', 'https://' ), array( '', '' ), addslashes( site_url() ) );
|
1762 |
+
//4.7
|
1763 |
+
if ( FALSE != stripos( $basedomain, '/' ) ) {
|
1764 |
+
$basedomain = substr( $basedomain, 0, stripos( $basedomain, '/' ) );
|
1765 |
+
}
|
1766 |
+
$client = WPLE_Trait::wple_verify_ssl( $basedomain );
|
1767 |
+
|
1768 |
+
if ( $client || is_ssl() ) {
|
1769 |
+
$reverter = uniqid( 'wple' );
|
1770 |
+
$savedopts = get_option( 'wple_opts' );
|
1771 |
+
$savedopts['force_ssl'] = 1;
|
1772 |
+
$savedopts['revertnonce'] = $reverter;
|
1773 |
+
WPLE_Trait::wple_send_reverter_secret( $reverter );
|
1774 |
+
update_option( 'wple_opts', $savedopts );
|
1775 |
+
delete_option( 'wple_error' );
|
1776 |
+
//complete
|
1777 |
+
update_option( 'wple_complete', 1 );
|
1778 |
+
update_option( 'siteurl', str_ireplace( 'http:', 'https:', get_option( 'siteurl' ) ) );
|
1779 |
+
update_option( 'home', str_ireplace( 'http:', 'https:', get_option( 'home' ) ) );
|
1780 |
+
echo 1 ;
|
1781 |
+
} else {
|
1782 |
+
echo 0 ;
|
1783 |
+
}
|
1784 |
+
|
1785 |
+
exit;
|
1786 |
+
}
|
1787 |
+
|
1788 |
+
public function wple_expert_block( &$html, $spmode = 0 )
|
1789 |
+
{
|
1790 |
+
}
|
1791 |
+
|
1792 |
+
/**
|
1793 |
+
* This site have mixed content issues
|
1794 |
+
*
|
1795 |
+
* @since 5.3.12
|
1796 |
+
* @return void
|
1797 |
+
*/
|
1798 |
+
public function wple_mixed_content_notice()
|
1799 |
+
{
|
1800 |
+
$html = '<div class="notice notice-info wple-admin-review wple-mx-prom">
|
1801 |
+
<div class="wple-review-box">
|
1802 |
+
<img src="' . WPLE_URL . 'admin/assets/symbol.png"/>
|
1803 |
+
<span><strong>Warning: ' . esc_html__( 'Your site have mixed content issues!', 'wp-letsencrypt-ssl' ) . '</strong><p>' . WPLE_Trait::wple_kses( __( 'Mixed content issues cause browser padlock to show as insecure even if you have installed SSL certificate perfectly. Hire an SSL Expert today to get rid of all SSL issues once and for all.', 'wp-letsencrypt-ssl' ) ) . '</p></span>
|
1804 |
+
</div>
|
1805 |
+
<a class="wple-lets-review wplerevbtn" href="https://checkout.freemius.com/mode/dialog/plugin/7616/plan/12469/licenses/1/" target="_blank">' . esc_html__( 'Hire SSL Expert', 'wp-letsencrypt-ssl' ) . '</a>
|
1806 |
+
<a class="wple-mx-ignore wplerevbtn" href="#">' . esc_html__( 'Ignore', 'wp-letsencrypt-ssl' ) . '</a>
|
1807 |
+
</div>';
|
1808 |
+
echo $html ;
|
1809 |
+
}
|
1810 |
+
|
1811 |
+
/**
|
1812 |
+
* Ajax Get cert contents for copy
|
1813 |
+
*
|
1814 |
+
* @since 5.3.16
|
1815 |
+
* @return void
|
1816 |
+
*/
|
1817 |
+
public function wple_retrieve_certs_forcopy()
|
1818 |
+
{
|
1819 |
+
if ( !wp_verify_nonce( $_GET['nc'], 'copycerts' ) || !current_user_can( 'manage_options' ) ) {
|
1820 |
+
exit( 'Authorization Failure' );
|
1821 |
+
}
|
1822 |
+
$ftype = $_GET['gettype'];
|
1823 |
+
$output = '';
|
1824 |
+
$keypath = ABSPATH . 'keys/';
|
1825 |
+
switch ( $ftype ) {
|
1826 |
+
case 'cert':
|
1827 |
+
if ( file_exists( $keypath . 'certificate.crt' ) ) {
|
1828 |
+
$output = file_get_contents( $keypath . 'certificate.crt' );
|
1829 |
+
}
|
1830 |
+
break;
|
1831 |
+
case 'key':
|
1832 |
+
if ( file_exists( $keypath . 'private.pem' ) ) {
|
1833 |
+
$output = file_get_contents( $keypath . 'private.pem' );
|
1834 |
+
}
|
1835 |
+
break;
|
1836 |
+
case 'cabundle':
|
1837 |
+
|
1838 |
+
if ( file_exists( ABSPATH . 'keys/cabundle.crt' ) ) {
|
1839 |
+
$output = file_get_contents( ABSPATH . 'keys/cabundle.crt' );
|
1840 |
+
} else {
|
1841 |
+
$output = file_get_contents( WPLE_DIR . 'cabundle/ca.crt' );
|
1842 |
+
}
|
1843 |
+
|
1844 |
+
break;
|
1845 |
+
}
|
1846 |
+
echo esc_html( $output ) ;
|
1847 |
+
exit;
|
1848 |
+
}
|
1849 |
+
|
1850 |
+
/**
|
1851 |
+
* Ajax check if both www & non-www domain accessible
|
1852 |
+
*
|
1853 |
+
* @since 5.6.2
|
1854 |
+
* @return void
|
1855 |
+
*/
|
1856 |
+
public function wple_include_www_check()
|
1857 |
+
{
|
1858 |
+
if ( !current_user_can( 'manage_options' ) || !wp_verify_nonce( $_GET['nc'], 'legenerate' ) ) {
|
1859 |
+
exit( 'Unauthorized request' );
|
1860 |
+
}
|
1861 |
+
$maindomain = WPLE_Trait::get_root_domain( false );
|
1862 |
+
$errcode = 'www';
|
1863 |
+
|
1864 |
+
if ( FALSE === stripos( 'www', $maindomain ) ) {
|
1865 |
+
$altdomain = 'www.' . $maindomain;
|
1866 |
+
} else {
|
1867 |
+
$errcode = 'nonwww';
|
1868 |
+
$altdomain = str_ireplace( 'www.', '', $maindomain );
|
1869 |
+
}
|
1870 |
+
|
1871 |
+
$altdomaintest = wp_remote_head( 'http://' . $altdomain, array(
|
1872 |
+
'sslverify' => false,
|
1873 |
+
'timeout' => 30,
|
1874 |
+
) );
|
1875 |
+
|
1876 |
+
if ( !is_wp_error( $altdomaintest ) ) {
|
1877 |
+
echo 1 ;
|
1878 |
+
exit;
|
1879 |
+
}
|
1880 |
+
|
1881 |
+
echo $errcode ;
|
1882 |
+
exit;
|
1883 |
+
}
|
1884 |
+
|
1885 |
+
}
|
admin/le_admin_page_wrapper.php
ADDED
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 5.0.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
require_once WPLE_DIR . 'classes/le-trait.php';
|
28 |
+
|
29 |
+
class WPLE_Admin_Page
|
30 |
+
{
|
31 |
+
public function __construct()
|
32 |
+
{
|
33 |
+
add_action('admin_enqueue_scripts', array($this, 'wple_admin_page_styles'));
|
34 |
+
}
|
35 |
+
|
36 |
+
public function wple_admin_page_styles()
|
37 |
+
{
|
38 |
+
wp_enqueue_style(WPLE_NAME, WPLE_URL . 'admin/css/le-admin.min.css', FALSE, WPLE_PLUGIN_VERSION, 'all');
|
39 |
+
|
40 |
+
wp_enqueue_script(WPLE_NAME . '-popper', WPLE_URL . 'admin/js/popper.min.js', array('jquery'), WPLE_PLUGIN_VERSION, true);
|
41 |
+
wp_enqueue_script(WPLE_NAME . '-tippy', WPLE_URL . 'admin/js/tippy-bundle.iife.min.js', array('jquery'), WPLE_PLUGIN_VERSION, true);
|
42 |
+
wp_enqueue_script(WPLE_NAME, WPLE_URL . 'admin/js/le-admin.js', array('jquery'), WPLE_PLUGIN_VERSION, true);
|
43 |
+
}
|
44 |
+
|
45 |
+
public function generate_page($pagecontent = '')
|
46 |
+
{
|
47 |
+
$html = '
|
48 |
+
<div class="wple-header">
|
49 |
+
<div>
|
50 |
+
<img src="' . WPLE_URL . 'admin/assets/logo.png" class="wple-logo"/> <span class="wple-version">v' . WPLE_PLUGIN_VERSION . '</span>
|
51 |
+
</div>';
|
52 |
+
|
53 |
+
WPLE_Trait::wple_headernav($html);
|
54 |
+
|
55 |
+
$html .= '</div>';
|
56 |
+
|
57 |
+
if (isset($_GET['page']) && $_GET['page'] != 'wp_encryption_force_https') {
|
58 |
+
$html .= '<div id="wple-sslgen" class="wple-subpages">
|
59 |
+
<div class="wple-other-content">' . $pagecontent . '</div>
|
60 |
+
<div class="wple-other-plugins">
|
61 |
+
<div><a href="https://wordpress.org/plugins/go-viral/" title="Opens in new tab" target="_blank"><img src="' . WPLE_URL . 'admin/assets/goviral-logo.png"/><h3>All in one social plugin</h3></a></div>
|
62 |
+
<div><a href="https://wordpress.org/plugins/modern-addons-elementor/" title="Opens in new tab" target="_blank"><img src="' . WPLE_URL . 'admin/assets/modernaddons-logo.png"/><h3>Premium widgets for Elementor</h3></a></div>
|
63 |
+
</div>
|
64 |
+
</div>';
|
65 |
+
} else {
|
66 |
+
$html .= '<div id="wple-sslgen">
|
67 |
+
<div>' . $pagecontent . '</div>
|
68 |
+
</div>';
|
69 |
+
}
|
70 |
+
echo $html;
|
71 |
+
}
|
72 |
+
|
73 |
+
protected function wple_force_ssl_htaccess()
|
74 |
+
{
|
75 |
+
|
76 |
+
if (is_writable(ABSPATH . '.htaccess')) {
|
77 |
+
|
78 |
+
$htaccess = file_get_contents(ABSPATH . '.htaccess');
|
79 |
+
|
80 |
+
if (FALSE === stripos($htaccess, 'WP_Encryption_Force_SSL')) {
|
81 |
+
$getrules = WPLE_Trait::compose_htaccess_rules();
|
82 |
+
|
83 |
+
$wpruleset = "# BEGIN WordPress";
|
84 |
+
|
85 |
+
if (strpos($htaccess, $wpruleset) !== false) {
|
86 |
+
$newhtaccess = str_replace($wpruleset, $getrules . $wpruleset, $htaccess);
|
87 |
+
} else {
|
88 |
+
$newhtaccess = $htaccess . $getrules;
|
89 |
+
}
|
90 |
+
|
91 |
+
insert_with_markers(ABSPATH . '.htaccess', '', $newhtaccess);
|
92 |
+
}
|
93 |
+
} else {
|
94 |
+
wp_die(esc_html__('HTACCESS not writable! Please go back and use alternate method of forcing SSL.', 'wp-letsencrypt-ssl'));
|
95 |
+
exit();
|
96 |
+
}
|
97 |
+
}
|
98 |
+
}
|
admin/le_admin_pages.php
ADDED
@@ -0,0 +1,839 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 5.0.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
require_once WPLE_DIR . 'admin/le_admin_page_wrapper.php';
|
28 |
+
require_once WPLE_DIR . 'classes/le-advanced-scanner.php';
|
29 |
+
class WPLE_SubAdmin extends WPLE_Admin_Page
|
30 |
+
{
|
31 |
+
public function __construct()
|
32 |
+
{
|
33 |
+
add_action( 'admin_menu', [ $this, 'wple_register_admin_pages' ], 11 );
|
34 |
+
add_action( 'admin_menu', [ $this, 'wple_register_secondary_admin_pages' ], 20 );
|
35 |
+
add_action( 'admin_init', [ $this, 'wple_force_https_handler' ] );
|
36 |
+
add_action( 'wp_ajax_wple_email_certs', [ $this, 'wple_email_certs_setting' ] );
|
37 |
+
add_action( 'wp_ajax_wple_review_notice', [ $this, 'wple_review_notice_disable' ] );
|
38 |
+
add_action( 'wp_ajax_wple_mxerror_ignore', [ $this, 'wple_mx_ignore' ] );
|
39 |
+
add_action( 'wp_ajax_wple_update_settings', [ $this, 'wple_update_settings' ] );
|
40 |
+
add_action( 'admin_bar_menu', [ $this, 'wple_ssl_toolbar' ], 100 );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Register sub pages
|
45 |
+
*
|
46 |
+
* @since 5.0.0
|
47 |
+
* @return void
|
48 |
+
*/
|
49 |
+
public function wple_register_admin_pages()
|
50 |
+
{
|
51 |
+
if ( !wple_fs()->is_plan( 'firewall', true ) ) {
|
52 |
+
|
53 |
+
if ( FALSE == ($fstage = get_option( 'wple_firewall_stage' )) || $fstage != 6 ) {
|
54 |
+
$ecount = get_option( 'wple_ssl_errors' );
|
55 |
+
$notifications = ( FALSE !== $ecount ? '<span class="awaiting-mod">' . (int) $ecount . '</span>' : '' );
|
56 |
+
add_submenu_page(
|
57 |
+
'wp_encryption',
|
58 |
+
'SSL HEALTH',
|
59 |
+
__( 'SSL HEALTH', 'wp-letsencrypt-ssl' ) . ' ' . $notifications . '',
|
60 |
+
'manage_options',
|
61 |
+
'wp_encryption_ssl_health',
|
62 |
+
[ $this, 'wple_sslhealth_page' ]
|
63 |
+
);
|
64 |
+
add_submenu_page(
|
65 |
+
'wp_encryption',
|
66 |
+
'Download SSL Certificates',
|
67 |
+
__( 'Download SSL Certificates', 'wp-letsencrypt-ssl' ),
|
68 |
+
'manage_options',
|
69 |
+
'wp_encryption_download',
|
70 |
+
[ $this, 'wple_download_page' ]
|
71 |
+
);
|
72 |
+
add_submenu_page(
|
73 |
+
'wp_encryption',
|
74 |
+
'Force HTTPS',
|
75 |
+
__( 'Force HTTPS', 'wp-letsencrypt-ssl' ),
|
76 |
+
'manage_options',
|
77 |
+
'wp_encryption_force_https',
|
78 |
+
[ $this, 'wple_force_https_page' ]
|
79 |
+
);
|
80 |
+
//if (FALSE != ($mx = get_option('wple_mx')) && $mx) {
|
81 |
+
add_submenu_page(
|
82 |
+
'wp_encryption',
|
83 |
+
'Advanced Insecure Content Scanner',
|
84 |
+
__( 'Advanced Insecure Content Scanner', 'wp-letsencrypt-ssl' ),
|
85 |
+
'manage_options',
|
86 |
+
'wp_encryption_mixed_scanner',
|
87 |
+
[ $this, 'wple_mixed_scanner_page' ]
|
88 |
+
);
|
89 |
+
//}
|
90 |
+
add_submenu_page(
|
91 |
+
null,
|
92 |
+
'Debug log',
|
93 |
+
__( 'Debug log', 'wp-letsencrypt-ssl' ),
|
94 |
+
'manage_options',
|
95 |
+
'wp_encryption_log',
|
96 |
+
[ $this, 'wple_debug_log_page' ]
|
97 |
+
);
|
98 |
+
}
|
99 |
+
|
100 |
+
}
|
101 |
+
//if (wple_fs()->can_use_premium_code__premium_only()) {
|
102 |
+
//if (wple_fs()->is_plan('firewall', true)) {
|
103 |
+
//TODO
|
104 |
+
///add_submenu_page('wp_encryption', 'CDN', __('CDN', 'wp-letsencrypt-ssl'), 'manage_options', 'wp_encryption_cdn', [$this, 'wple_cdn_page__premium_only']);
|
105 |
+
//}
|
106 |
+
//}
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Register sub pages
|
111 |
+
*
|
112 |
+
* @since 5.0.0
|
113 |
+
* @return void
|
114 |
+
*/
|
115 |
+
public function wple_register_secondary_admin_pages()
|
116 |
+
{
|
117 |
+
if ( !wple_fs()->is_plan( 'firewall', true ) ) {
|
118 |
+
|
119 |
+
if ( FALSE == ($fstage = get_option( 'wple_firewall_stage' )) || $fstage != 6 ) {
|
120 |
+
add_submenu_page(
|
121 |
+
null,
|
122 |
+
'How-To Videos',
|
123 |
+
__( 'How-To Videos', 'wp-letsencrypt-ssl' ),
|
124 |
+
'manage_options',
|
125 |
+
'wp_encryption_howto_videos',
|
126 |
+
[ $this, 'wple_howto_page' ]
|
127 |
+
);
|
128 |
+
add_submenu_page(
|
129 |
+
null,
|
130 |
+
'FAQ',
|
131 |
+
__( 'FAQ', 'wp-letsencrypt-ssl' ),
|
132 |
+
'manage_options',
|
133 |
+
'wp_encryption_faq',
|
134 |
+
[ $this, 'wple_faq_page' ]
|
135 |
+
);
|
136 |
+
}
|
137 |
+
|
138 |
+
}
|
139 |
+
add_submenu_page(
|
140 |
+
'wp_encryption',
|
141 |
+
'Reset',
|
142 |
+
__( 'RESET', 'wp-letsencrypt-ssl' ),
|
143 |
+
'manage_options',
|
144 |
+
'wp_encryption_reset',
|
145 |
+
[ $this, 'wple_tools_block' ]
|
146 |
+
);
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
+
* Force HTTPS page
|
151 |
+
*
|
152 |
+
* @since 5.0.0
|
153 |
+
* @source le_admin.php moved
|
154 |
+
* @return void
|
155 |
+
*/
|
156 |
+
public function wple_force_https_page()
|
157 |
+
{
|
158 |
+
$leopts = get_option( 'wple_opts' );
|
159 |
+
$checked = ( isset( $leopts['force_ssl'] ) && $leopts['force_ssl'] === 1 ? 'checked' : '' );
|
160 |
+
$htaccesschecked = ( isset( $leopts['force_ssl'] ) && $leopts['force_ssl'] === 2 ? 'checked' : '' );
|
161 |
+
$disablechecked = ( !isset( $leopts['force_ssl'] ) || $checked == '' && $htaccesschecked == '' ? 'checked' : '' );
|
162 |
+
$page = "<h2>" . __( 'Force HTTPS', 'wp-letsencrypt-ssl' ) . "</h2>\r\n <div class=\"wple-force\">\r\n <p>" . WPLE_Trait::wple_kses( __( "If you still don't see a green padlock or notice <b>mixed content</b> warning in your browser console - please enable the below option to force HTTPS on all resources of site.", 'wp-letsencrypt-ssl' ) ) . ' ' . sprintf( __( "If you still notice mixed content issues or issues with browser padlock not showing on your site, please use %sMixed Content Scanner%s to scan and identify exact issues causing browser padlock to not show!.", "wp-letsencrypt-ssl" ), '<strong>', '</strong>' ) . "</p>";
|
163 |
+
$htaccesswritable = is_writable( ABSPATH . '.htaccess' );
|
164 |
+
$htaccessdisabled = ( $htaccesswritable ? '' : 'disabled' );
|
165 |
+
$htaccessdisabledmsg = ( $htaccesswritable ? '' : ' (Disabled: Your <strong>.htaccess</strong> file is <a href="https://wpencryption.com/make-htaccess-writable-wordpress/" target="_blank">not writable</a>)' );
|
166 |
+
$page .= '<form method="post">
|
167 |
+
<label class="checkbox-label" style="float:left">
|
168 |
+
<input type="radio" name="wple_forcessl" value="0" ' . $disablechecked . '>
|
169 |
+
<span class="checkbox-custom rectangular"></span>
|
170 |
+
</label>
|
171 |
+
|
172 |
+
<label>' . esc_html__( 'Disable', 'wp-letsencrypt-ssl' ) . '</label><br /><br />
|
173 |
+
|
174 |
+
<label class="checkbox-label" style="float:left">
|
175 |
+
<input type="radio" name="wple_forcessl" value="2" ' . $htaccessdisabled . ' ' . $htaccesschecked . '>
|
176 |
+
<span class="checkbox-custom rectangular"></span>
|
177 |
+
</label>
|
178 |
+
|
179 |
+
<label class="' . $htaccessdisabled . '">' . esc_html__( 'Force SSL via HTACCESS (Server level redirect - Faster)', 'wp-letsencrypt-ssl' ) . ' - ' . esc_html__( 'Most suitable for new sites & sites using proxies', 'wp-letsencrypt-ssl' ) . $htaccessdisabledmsg . '</label><br /><br />
|
180 |
+
|
181 |
+
<label class="checkbox-label" style="float:left">
|
182 |
+
<input type="radio" name="wple_forcessl" value="1" ' . $checked . '>
|
183 |
+
<span class="checkbox-custom rectangular"></span>
|
184 |
+
</label>
|
185 |
+
|
186 |
+
<label>' . esc_html__( 'Force SSL via WordPress (Alternate solution if htaccess redirect cause any issues)', 'wp-letsencrypt-ssl' ) . ' - ' . esc_html__( 'Most suitable for old sites with lots of assets, links.', 'wp-letsencrypt-ssl' ) . '</label><br /><br />
|
187 |
+
|
188 |
+
' . wp_nonce_field(
|
189 |
+
'wpleforcessl',
|
190 |
+
'site-force-ssl',
|
191 |
+
false,
|
192 |
+
false
|
193 |
+
) . '
|
194 |
+
<button type="submit" name="wple_ssl">' . esc_html__( 'Save', 'wp-letsencrypt-ssl' ) . '</button>
|
195 |
+
</form>
|
196 |
+
</div>';
|
197 |
+
$this->generate_page( $page );
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* Force HTTPS Handler
|
202 |
+
*
|
203 |
+
* @since 5.0.0
|
204 |
+
* @source le_admin.php moved
|
205 |
+
* @return void
|
206 |
+
*/
|
207 |
+
public function wple_force_https_handler()
|
208 |
+
{
|
209 |
+
//force ssl
|
210 |
+
|
211 |
+
if ( isset( $_POST['site-force-ssl'] ) ) {
|
212 |
+
if ( !wp_verify_nonce( $_POST['site-force-ssl'], 'wpleforcessl' ) || !current_user_can( 'manage_options' ) ) {
|
213 |
+
die( 'Unauthorized request' );
|
214 |
+
}
|
215 |
+
$basedomain = str_ireplace( array( 'http://', 'https://' ), array( '', '' ), site_url() );
|
216 |
+
//4.7
|
217 |
+
if ( FALSE != stripos( $basedomain, '/' ) ) {
|
218 |
+
$basedomain = substr( $basedomain, 0, stripos( $basedomain, '/' ) );
|
219 |
+
}
|
220 |
+
$client = WPLE_Trait::wple_verify_ssl( $basedomain );
|
221 |
+
$reverter = uniqid( 'wple' );
|
222 |
+
$leopts = get_option( 'wple_opts' );
|
223 |
+
$prevforce = ( isset( $leopts['force_ssl'] ) ? $leopts['force_ssl'] : 0 );
|
224 |
+
$leopts['force_ssl'] = (int) $_POST['wple_forcessl'];
|
225 |
+
|
226 |
+
if ( !$client && $leopts['force_ssl'] != 0 && !is_ssl() ) {
|
227 |
+
$nossl = '<p>' . esc_html__( 'We could not detect valid SSL on your site!. Please double check SSL certificate is properly installed on your cPanel / Server. You can also try opening wp-admin via https:// and then enable force HTTPS.', 'wp-letsencrypt-ssl' ) . '</p>';
|
228 |
+
$nossl .= '<p>' . esc_html__( 'Switching to HTTPS without properly installing the SSL certificate might break your site.', 'wp-letsencrypt-ssl' ) . '</p>';
|
229 |
+
$nossl .= '<a href="?page=wp_encryption&forceenablehttps=' . wp_create_nonce( 'hardforcessl' ) . '&forcetype=' . (int) $leopts['force_ssl'] . '" style="background: #f55656; color: #fff; padding: 10px; text-decoration: none; border-radius: 5px; display: inline-block; margin:0 0 10px;"><strong>' . esc_html__( 'CLICK TO FORCE ENABLE HTTPS (Do it at your own risk)', 'wp-letsencrypt-ssl' ) . '</strong></a><br />
|
230 |
+
<small>' . sprintf( esc_html__( 'In case you break the site, here is revert back to HTTP:// instructions - %s', 'wp-letsencrypt-ssl' ), 'https://wordpress.org/support/topic/locked-out-unable-to-access-site-after-forcing-https-2/' ) . '</small>';
|
231 |
+
wp_die( $nossl );
|
232 |
+
exit;
|
233 |
+
}
|
234 |
+
|
235 |
+
if ( $leopts['force_ssl'] == 1 ) {
|
236 |
+
$leopts['revertnonce'] = $reverter;
|
237 |
+
}
|
238 |
+
update_option( 'wple_opts', $leopts );
|
239 |
+
|
240 |
+
if ( $leopts['force_ssl'] != 0 ) {
|
241 |
+
update_option( 'siteurl', str_ireplace( 'http:', 'https:', get_option( 'siteurl' ) ) );
|
242 |
+
update_option( 'home', str_ireplace( 'http:', 'https:', get_option( 'home' ) ) );
|
243 |
+
|
244 |
+
if ( $leopts['force_ssl'] == 1 ) {
|
245 |
+
if ( $prevforce == 2 ) {
|
246 |
+
$this->wple_clean_htaccess();
|
247 |
+
}
|
248 |
+
WPLE_Trait::wple_send_reverter_secret( $reverter );
|
249 |
+
} elseif ( $leopts['force_ssl'] == 2 ) {
|
250 |
+
$this->wple_force_ssl_htaccess();
|
251 |
+
}
|
252 |
+
|
253 |
+
} else {
|
254 |
+
//if ($prevforce == 2) { //previously htaccess forced so remove them
|
255 |
+
$this->wple_clean_htaccess();
|
256 |
+
//}
|
257 |
+
update_option( 'siteurl', str_ireplace( 'https:', 'http:', get_option( 'siteurl' ) ) );
|
258 |
+
update_option( 'home', str_ireplace( 'https:', 'http:', get_option( 'home' ) ) );
|
259 |
+
}
|
260 |
+
|
261 |
+
wp_redirect( admin_url( 'admin.php?page=wp_encryption_force_https&successnotice=1' ) );
|
262 |
+
exit;
|
263 |
+
}
|
264 |
+
|
265 |
+
//HARD force ssl since 4.7.2
|
266 |
+
|
267 |
+
if ( isset( $_GET['forceenablehttps'] ) ) {
|
268 |
+
if ( !wp_verify_nonce( $_GET['forceenablehttps'], 'hardforcessl' ) || !current_user_can( 'manage_options' ) ) {
|
269 |
+
die( 'Unauthorized request' );
|
270 |
+
}
|
271 |
+
|
272 |
+
if ( $_GET['forcetype'] == 1 ) {
|
273 |
+
$reverter = uniqid( 'wple' );
|
274 |
+
$leopts = get_option( 'wple_opts' );
|
275 |
+
$leopts['force_ssl'] = 1;
|
276 |
+
$leopts['revertnonce'] = $reverter;
|
277 |
+
update_option( 'wple_opts', $leopts );
|
278 |
+
WPLE_Trait::wple_send_reverter_secret( $reverter );
|
279 |
+
} else {
|
280 |
+
$leopts = get_option( 'wple_opts' );
|
281 |
+
$leopts['force_ssl'] = 2;
|
282 |
+
update_option( 'wple_opts', $leopts );
|
283 |
+
$this->wple_force_ssl_htaccess();
|
284 |
+
}
|
285 |
+
|
286 |
+
update_option( 'siteurl', str_ireplace( 'http:', 'https:', get_option( 'siteurl' ) ) );
|
287 |
+
update_option( 'home', str_ireplace( 'http:', 'https:', get_option( 'home' ) ) );
|
288 |
+
wp_redirect( admin_url( 'admin.php?page=wp_encryption_force_https&successnotice=1' ) );
|
289 |
+
exit;
|
290 |
+
}
|
291 |
+
|
292 |
+
}
|
293 |
+
|
294 |
+
/**
|
295 |
+
* FAQ
|
296 |
+
*
|
297 |
+
* @since 5.0.0
|
298 |
+
* @source le_admin.php moved
|
299 |
+
* @return void
|
300 |
+
*/
|
301 |
+
public function wple_faq_page()
|
302 |
+
{
|
303 |
+
$page = '<h2>' . esc_html__( 'FREQUENTLY ASKED QUESTIONS', 'wp-letsencrypt-ssl' ) . '</h2>
|
304 |
+
<h4>' . esc_html( 'Why choose WP Encryption Pro over other SSL providers?', 'wp-letsencrypt-ssl' ) . '</h4>
|
305 |
+
<p>' . esc_html( 'Our support staff is consisted of top notch developers and WordPress experts who can help with SSL implementation for any customized server environments. We have helped with SSL setup for 500+ complex Apache, Nginx, Bitnami, Lightsail, Reverse proxy servers.', 'wp-letsencrypt-ssl' ) . '</p>
|
306 |
+
<hr>
|
307 |
+
<h4>' . esc_html__( 'Should I configure anything after upgrading to PRO?', 'wp-letsencrypt-ssl' ) . '</h4>
|
308 |
+
<p>' . esc_html__( 'If you have already installed SSL on your cPanel/server, auto renewal of SSL will start working in background after upgrading and activating your PRO license. If you have not yet installed SSL on your cPanel/server, please click on STEP 1 in progress bar and run the SSL install form once by entering your email and clicking on Generate SSL button, this will automate the SSL installation as well as the automatic renewal in background.', 'wp-letsencrypt-ssl' ) . '</p>
|
309 |
+
<hr>
|
310 |
+
<h4>' . esc_html__( 'Does installing the plugin will instantly turn my site https?', 'wp-letsencrypt-ssl' ) . '</h4>
|
311 |
+
<p>' . esc_html__( 'Installing SSL certificate is a server side process and not as simple as installing a ready widget and using it instantly. You will have to follow some simple steps to install SSL for your WordPress site. Our plugin acts like a tool to generate and install SSL for your WordPress site. On FREE version of plugin - You should manually go through the SSL certificate installation process following the simple video tutorial. Whereas, the SSL certificates are easily generated by our plugin by running a simple SSL generation form.', 'wp-letsencrypt-ssl' ) . '</p>
|
312 |
+
<hr>
|
313 |
+
<h4>' . esc_html__( 'How to install SSL for both www & non-www version of my domain?', 'wp-letsencrypt-ssl' ) . '</h4>
|
314 |
+
<p>' . WPLE_Trait::wple_kses( __( 'First of all, Please make sure you can access your site with and without www. Otherwise you will be not able to complete domain verification for both www & non-www together. If both of your www and non-www domains are publicly accessible, A new option named <strong>"Generate SSL for both www & non-www"</strong> will be automatically shown on WP Encryption SSL install form. You can also force enable this checkbox by adding <strong>includewww=1</strong> to page url i.e., <strong>/wp-admin/admin.php?page=wp_encryption&includewww=1</strong>', 'wp-letsencrypt-ssl' ) ) . '</p>
|
315 |
+
<hr>
|
316 |
+
<h4>' . esc_html__( 'Secure webmail & mail server with SSL Certificate', 'wp-letsencrypt-ssl' ) . '</h4>
|
317 |
+
<p>' . sprintf( __( 'Starting from WP Encryption v5.4.8, you can now secure your webmail & incoming/outgoing email server %sfollowing this guide%s', 'wp-letsencrypt-ssl' ), '<a href="https://wpencryption.com/secure-webmail-with-https/" target="_blank">', '</a>' ) . '</p>
|
318 |
+
<hr>
|
319 |
+
<h4>' . esc_html__( 'Images not loading on HTTPS site', 'wp-letsencrypt-ssl' ) . '</h4>
|
320 |
+
<p>' . esc_html__( 'Images on your site might be loading over http:// protocol, please enable "Force HTTPS" feature via WP Encryption page. If you have Elementor page builder installed, please go to Elementor > Tools > Replace URL and replace your http:// site url with https://. Make sure you have SSL certificates installed and browser padlock shows certificate(valid) before forcing these https measures.', 'wp-letsencrypt-ssl' ) . '</p>
|
321 |
+
<p>' . esc_html__( 'If you are still not seeing padlock, We recommend testing your site at whynopadlock.com to determine the exact issue. If you have any image sliders, background images might be loading over http:// url instead of https:// and causing mixed content issues thus making padlock to not show.', 'wp-letsencrypt-ssl' ) . '</p>
|
322 |
+
<hr>
|
323 |
+
<h4>' . esc_html__( 'How do I renew my SSL certificate before expiry date?', 'wp-letsencrypt-ssl' ) . '</h4>
|
324 |
+
<p>' . WPLE_Trait::wple_kses( __( 'Your SSL certificate will be auto renewed if you have <b>WP Encryption PRO</b> plugin purchased (SSL certs will be auto renewed in background just before the expiry date). If you have free version of plugin installed, You can use the same process of "Generate SSL Certificate" to get new certs.', 'wp-letsencrypt-ssl' ) ) . '</p>
|
325 |
+
<hr>
|
326 |
+
<h4>' . esc_html__( 'How do I install Wildcard SSL?', 'wp-letsencrypt-ssl' ) . '</h4>
|
327 |
+
<p>' . WPLE_Trait::wple_kses( __( 'If you have purchased the <b>WP Encryption PRO</b> version, You can notice Single domain vs Wildcard SSL switch on WP Encryption page.', 'wp-letsencrypt-ssl' ) ) . '</p>
|
328 |
+
<hr>
|
329 |
+
<h4>' . esc_html__( 'How to test if my SSL installation is good?', 'wp-letsencrypt-ssl' ) . '</h4>
|
330 |
+
<p>' . WPLE_Trait::wple_kses( sprintf( __( 'You can run a SSL test by entering your website url in <a href="%s" rel="%s">SSL Labs</a> site.', 'wp-letsencrypt-ssl' ), 'https://www.ssllabs.com/ssltest/', 'nofollow' ), 'a' ) . '</p>
|
331 |
+
<hr>
|
332 |
+
<h4>' . esc_html__( 'How to revert back to HTTP in case of force HTTPS failure?', 'wp-letsencrypt-ssl' ) . '</h4>
|
333 |
+
<p>' . esc_html__( 'Please follow the revert back instructions given in [support forum](https://wordpress.org/support/plugin/wp-letsencrypt-ssl/).', 'wp-letsencrypt-ssl' ) . '</p>
|
334 |
+
<hr>
|
335 |
+
<h4>' . esc_html__( 'Have a different question?', 'wp-letsencrypt-ssl' ) . '</h4>
|
336 |
+
<p>' . WPLE_Trait::wple_kses( sprintf( __( 'Please use our <a href="%s" target="%s">Plugin support forum</a>. <b>PRO</b> users can register free account & use priority support at gowebsmarty.in. More info - https://wpencryption.com', 'wp-letsencrypt-ssl' ), 'https://wordpress.org/support/plugin/wp-letsencrypt-ssl/', '_blank' ), 'a' ) . '</p>';
|
337 |
+
$this->generate_page( $page );
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* How-To Videos
|
342 |
+
*
|
343 |
+
* @since 5.0.0
|
344 |
+
* @source le_admin.php moved
|
345 |
+
* @return void
|
346 |
+
*/
|
347 |
+
public function wple_howto_page()
|
348 |
+
{
|
349 |
+
$page = '<h2>' . __( 'How-To Videos', 'wp-letsencrypt-ssl' ) . '</h2>
|
350 |
+
<h3>' . esc_html__( "How to complete domain verification via DNS challenge?", 'wp-letsencrypt-ssl' ) . '</h3>
|
351 |
+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/BBQL69PDDrk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
352 |
+
|
353 |
+
<h3 style="margin-top: 20px;">' . esc_html__( "How to install SSL Certificate on cPanel?", 'wp-letsencrypt-ssl' ) . '</h3>
|
354 |
+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/KQ2HYtplPEk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
355 |
+
|
356 |
+
<h3 style="margin-top: 20px;">' . esc_html__( "How to install SSL Certificate on Non-cPanel site via SSH access?", 'wp-letsencrypt-ssl' ) . '</h3>
|
357 |
+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/PANs_C2SI5Q" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
358 |
+
|
359 |
+
<h3 style="margin-top: 20px;">' . esc_html__( "PRO - Automate DNS verification for Godaddy", 'wp-letsencrypt-ssl' ) . '</h3>
|
360 |
+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/7Dztj-02Ebg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
|
361 |
+
$this->generate_page( $page );
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Download SSL Certs
|
366 |
+
*
|
367 |
+
* @since 5.1.0
|
368 |
+
* @return HTML
|
369 |
+
*/
|
370 |
+
public function wple_download_page()
|
371 |
+
{
|
372 |
+
$cert = ABSPATH . 'keys/certificate.crt';
|
373 |
+
$forced_completion = get_option( 'wple_backend' );
|
374 |
+
$html = '<div class="download-certs" data-update="' . wp_create_nonce( 'wpledownloadpage' ) . '">';
|
375 |
+
$emailattachment = esc_html__( 'Email SSL certs as attachment when SSL is generated / auto renewed.', 'wp-letsencrypt-ssl' );
|
376 |
+
$emailcerts = get_option( 'wple_email_certs' );
|
377 |
+
$emailcertswitch = '<div class="plan-toggler" style="text-align: left; margin: 40px 0 0px;"><span></span><label class="toggle">
|
378 |
+
<input class="toggle-checkbox email-certs-switch" type="checkbox" ' . checked( $emailcerts, true, false ) . '>
|
379 |
+
<div class="toggle-switch" style="transform: scale(0.9);"></div>
|
380 |
+
<span class="toggle-label">' . $emailattachment . '</span>
|
381 |
+
</label>
|
382 |
+
</div>';
|
383 |
+
|
384 |
+
if ( file_exists( $cert ) ) {
|
385 |
+
$leopts = get_option( 'wple_opts' );
|
386 |
+
|
387 |
+
if ( !$forced_completion ) {
|
388 |
+
$html .= '<h3 style="margin:10px 13px 30px">' . esc_html__( 'Your current SSL certificate expires on', 'wp-letsencrypt-ssl' ) . ': <b>' . esc_html( $leopts['expiry'] ) . '</b></h3>';
|
389 |
+
WPLE_Trait::wple_copy_and_download( $html );
|
390 |
+
}
|
391 |
+
|
392 |
+
$html .= $emailcertswitch;
|
393 |
+
} else {
|
394 |
+
if ( !$forced_completion ) {
|
395 |
+
$html .= '<div class="wple-no-certs">' . esc_html__( "You don't have any SSL certificates generated yet! Please generate your single/wildcard SSL first before you can download it here.", 'wp-letsencrypt-ssl' ) . '</div>';
|
396 |
+
}
|
397 |
+
$html .= $emailcertswitch;
|
398 |
+
}
|
399 |
+
|
400 |
+
$html .= '</div>';
|
401 |
+
$this->generate_page( $html );
|
402 |
+
}
|
403 |
+
|
404 |
+
public function wple_debug_log_page()
|
405 |
+
{
|
406 |
+
$file = WPLE_DEBUGGER . 'debug.log';
|
407 |
+
$html = '<h3>' . esc_html__( 'Please share below debug log when requesting support', 'wp-letsencrypt-ssl' ) . '</h3>';
|
408 |
+
|
409 |
+
if ( file_exists( $file ) ) {
|
410 |
+
$log = file_get_contents( $file );
|
411 |
+
$hideh2 = '';
|
412 |
+
if ( isset( $_GET['dnsverified'] ) || isset( $_GET['dnsverify'] ) ) {
|
413 |
+
$hideh2 = 'hideheader';
|
414 |
+
}
|
415 |
+
$html .= '<div class="le-debugger running ' . $hideh2 . '"><h3>' . esc_html__( 'Debug Log', 'wp-letsencrypt-ssl' ) . ':</h3>' . wp_kses_post( nl2br( $log ) ) . '</div>';
|
416 |
+
} else {
|
417 |
+
$html .= '<div class="le-debugger">' . esc_html__( "Full response will be shown here", 'wp-letsencrypt-ssl' ) . '</div>';
|
418 |
+
}
|
419 |
+
|
420 |
+
$this->generate_page( $html );
|
421 |
+
}
|
422 |
+
|
423 |
+
/**
|
424 |
+
* Handy Tools
|
425 |
+
*
|
426 |
+
* @since 4.5.0
|
427 |
+
* @source le_admin.php moved since 5.1.0
|
428 |
+
* @return $html
|
429 |
+
*/
|
430 |
+
public function wple_tools_block()
|
431 |
+
{
|
432 |
+
$html = '<h3>' . esc_html__( 'Reset / Delete Keys folder and restart the process', 'wp-letsencrypt-ssl' ) . '</h3>';
|
433 |
+
$html .= '<p>' . esc_html__( "Use this handy tool to reset the SSL process and start again in case you get some error like 'no account exists with provided key'. This reset action will ONLY delete the generated certificate, keys folder and reset SSL install form to initial state. This won't affect SSL installed on your site or any other part of your site.", 'wp-letsencrypt-ssl' ) . '</p>';
|
434 |
+
$html .= '<a href="' . wp_nonce_url( admin_url( 'admin.php?page=wp_encryption' ), 'restartwple', 'wplereset' ) . '" class="wple-reset-button">' . esc_html__( 'RESET KEYS AND CERTIFICATE', 'wp-letsencrypt-ssl' ) . '</a>';
|
435 |
+
$this->generate_page( $html );
|
436 |
+
}
|
437 |
+
|
438 |
+
public function wple_clean_htaccess()
|
439 |
+
{
|
440 |
+
|
441 |
+
if ( is_writable( ABSPATH . '.htaccess' ) ) {
|
442 |
+
$htaccess = file_get_contents( ABSPATH . '.htaccess' );
|
443 |
+
$group = "/#\\s?BEGIN\\s?WP_Encryption_Force_SSL.*?#\\s?END\\s?WP_Encryption_Force_SSL/s";
|
444 |
+
|
445 |
+
if ( preg_match( $group, $htaccess ) ) {
|
446 |
+
$modhtaccess = preg_replace( $group, "", $htaccess );
|
447 |
+
//insert_with_markers(ABSPATH . '.htaccess', '', $modhtaccess);
|
448 |
+
file_put_contents( ABSPATH . '.htaccess', $modhtaccess );
|
449 |
+
}
|
450 |
+
|
451 |
+
} else {
|
452 |
+
wp_die( esc_html__( '.htaccess file not writable. Please remove WP_Encryption_Force_SSL block from .htaccess file manually using FTP or File Manager.', 'wp-letsencrypt-ssl' ) );
|
453 |
+
exit;
|
454 |
+
}
|
455 |
+
|
456 |
+
}
|
457 |
+
|
458 |
+
public function wple_mixed_scanner_page()
|
459 |
+
{
|
460 |
+
$html = '<h2>' . esc_html__( 'Advanced Insecure Content Scanner', 'wp-letsencrypt-ssl' ) . '</h2><p style="margin: -20px auto 40px auto; font-size: 16px; text-align: center; width: 1400px; max-width: 100%;">' . WPLE_Trait::wple_kses( __( 'Scan your entire site (public posts + pages) for mixed/insecure content issues that are causing secure browser padlock to not show even if SSL certificate is installed correctly. SOURCE column shows you where the insecure url is coming from, you can easily find the mixed content url and update it to https:// to resolve the issue. Issues arising from Widgets or Inline are global issues which could be breaking HTTPS padlock on several of your webpages. Resolve the issues, reload and re-scan to confirm everything is resolved.', 'wp-letsencrypt-ssl' ) ) . '.</p>';
|
461 |
+
$html .= "<p style=\"margin: -20px auto 40px auto; font-size: 16px; text-align: center; width: 1400px; max-width: 100%;font-style:italic;color:#666;\">We're working hard to add more features. Please consider upgrading to <a href=\"" . admin_url( '/admin.php?page=wp_encryption-pricing' ) . "\">PRO</a> version if you wish to support the development.</p>";
|
462 |
+
$html .= '<div id="wple-scanner">
|
463 |
+
<button class="wple-scan" data-nc="' . wp_create_nonce( 'wplemixedscanner' ) . '">' . esc_html__( 'START THE SCAN', 'wp-letsencrypt-ssl' ) . '</button>
|
464 |
+
</div>';
|
465 |
+
$html .= '<div id="wple-scanner-iframe">
|
466 |
+
<div class="wple-scanbar"></div>
|
467 |
+
<div class="wple-frameholder"></div>
|
468 |
+
</div>
|
469 |
+
|
470 |
+
<div id="wple-scanresults"></div>';
|
471 |
+
$this->generate_page( $html );
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Enabled/Disable Email certs setting
|
476 |
+
*
|
477 |
+
* @since 5.3.5
|
478 |
+
* @return void
|
479 |
+
*/
|
480 |
+
public function wple_email_certs_setting()
|
481 |
+
{
|
482 |
+
if ( !wp_verify_nonce( $_POST['nc'], 'wpledownloadpage' ) ) {
|
483 |
+
exit( 'failed' );
|
484 |
+
}
|
485 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
486 |
+
exit( 'failed' );
|
487 |
+
}
|
488 |
+
$val = (bool) $_POST['emailcert'];
|
489 |
+
update_option( 'wple_email_certs', $val );
|
490 |
+
echo "success" ;
|
491 |
+
exit;
|
492 |
+
}
|
493 |
+
|
494 |
+
/**
|
495 |
+
* Review admin notice ajax
|
496 |
+
*
|
497 |
+
* @since 5.3.12
|
498 |
+
* @return void
|
499 |
+
*/
|
500 |
+
public function wple_review_notice_disable()
|
501 |
+
{
|
502 |
+
if ( !wp_verify_nonce( $_POST['nc'], 'wplereview' ) || !current_user_can( 'manage_options' ) ) {
|
503 |
+
exit( 'Unauthorized' );
|
504 |
+
}
|
505 |
+
$ch = (int) $_POST['choice'];
|
506 |
+
|
507 |
+
if ( $ch == 2 ) {
|
508 |
+
//remind later
|
509 |
+
delete_option( 'wple_show_review' );
|
510 |
+
wp_schedule_single_event( strtotime( '+3 day', time() ), 'wple_show_reviewrequest' );
|
511 |
+
} else {
|
512 |
+
//already reviewed
|
513 |
+
delete_option( 'wple_show_review' );
|
514 |
+
}
|
515 |
+
|
516 |
+
exit;
|
517 |
+
}
|
518 |
+
|
519 |
+
/**
|
520 |
+
* Ignore mixed content errors and hire expert prom
|
521 |
+
*
|
522 |
+
* @since 5.3.12
|
523 |
+
* @return void
|
524 |
+
*/
|
525 |
+
public function wple_mx_ignore()
|
526 |
+
{
|
527 |
+
|
528 |
+
if ( current_user_can( 'manage_options' ) ) {
|
529 |
+
delete_option( 'wple_mixed_issues' );
|
530 |
+
echo "success" ;
|
531 |
+
}
|
532 |
+
|
533 |
+
exit;
|
534 |
+
}
|
535 |
+
|
536 |
+
/**
|
537 |
+
* New SSL health page with score
|
538 |
+
*
|
539 |
+
* @since 5.5.0
|
540 |
+
* @return void
|
541 |
+
*/
|
542 |
+
public function wple_sslhealth_page()
|
543 |
+
{
|
544 |
+
$html = '<div id="wple-ssl-health">';
|
545 |
+
$html .= $this->wple_ssl_score();
|
546 |
+
$html .= $this->wple_ssl_settings();
|
547 |
+
$html .= '</div>';
|
548 |
+
echo $html ;
|
549 |
+
}
|
550 |
+
|
551 |
+
private function wple_ssl_score()
|
552 |
+
{
|
553 |
+
$scorecard = array(
|
554 |
+
'valid_ssl' => 30,
|
555 |
+
'ssl_redirect' => 10,
|
556 |
+
'mixed_content_fixer' => 10,
|
557 |
+
'hsts' => 10,
|
558 |
+
'security_headers' => 10,
|
559 |
+
'tls_version' => 10,
|
560 |
+
'ssl_auto_renew' => 20,
|
561 |
+
);
|
562 |
+
$scoredefinitions = array(
|
563 |
+
'valid_ssl' => 'Valid SSL Certificate exists (<a href="/wp-admin/admin.php?page=wp_encryption">Install SSL Now</a>).',
|
564 |
+
'ssl_redirect' => 'HTTP to HTTPS redirect enabled (<a href="/wp-admin/admin.php?page=wp_encryption_force_https">Enable Redirection</a>)',
|
565 |
+
'mixed_content_fixer' => 'Mixed content fixer enabled',
|
566 |
+
'hsts' => 'HSTS Strict Transport header enabled',
|
567 |
+
'security_headers' => 'Important security headers enabled',
|
568 |
+
'tls_version' => 'TLS version up-to-date',
|
569 |
+
'ssl_auto_renew' => 'SSL certificate is set to auto renew (<a href="/wp-admin/admin.php?page=wp_encryption-pricing">Premium</a>)',
|
570 |
+
);
|
571 |
+
$score = 0;
|
572 |
+
$featurelist = '<ul>';
|
573 |
+
$error_count = 0;
|
574 |
+
foreach ( $scoredefinitions as $key => $desc ) {
|
575 |
+
$isenabled = $this->wple_feature_check( $key );
|
576 |
+
$sayyesno = '<span class="wple-no">no</span>';
|
577 |
+
|
578 |
+
if ( $isenabled ) {
|
579 |
+
$sayyesno = '<span class="wple-yes">Yes</span>';
|
580 |
+
$score += (int) $scorecard[$key];
|
581 |
+
} else {
|
582 |
+
$error_count++;
|
583 |
+
}
|
584 |
+
|
585 |
+
$featurelist .= '<li class="' . esc_attr( $key ) . '">' . $sayyesno . WPLE_Trait::wple_kses( $desc, 'a' ) . (( $key == 'tls_version' ? '<span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="TLS version should be 1.2 or above. Contact your hosting support to update TLS version or our Annual PRO plan can offer TLS1.2 protocol."></span>' : '' )) . '</li>';
|
586 |
+
}
|
587 |
+
$featurelist .= '<li><strong>Recommended:</strong> Run Insecure content scanner & make sure everything is resolved (<a href="/wp-admin/admin.php?page=wp_encryption_mixed_scanner">Scan now</a>)</li>';
|
588 |
+
//5.7.0
|
589 |
+
$plugin = false;
|
590 |
+
|
591 |
+
if ( defined( 'rsssl_plugin' ) ) {
|
592 |
+
$plugin = "Really Simple SSL";
|
593 |
+
} elseif ( defined( 'WPSSL_VER' ) ) {
|
594 |
+
$plugin = "WP Free SSL";
|
595 |
+
} elseif ( defined( 'SSL_ZEN_PLUGIN_VERSION' ) ) {
|
596 |
+
$plugin = "SSL Zen";
|
597 |
+
} elseif ( defined( 'WPSSL_VER' ) ) {
|
598 |
+
$plugin = "WP Free SSL";
|
599 |
+
} elseif ( defined( 'SSLFIX_PLUGIN_VERSION' ) ) {
|
600 |
+
$plugin = "SSL Insecure Content Fixer";
|
601 |
+
} elseif ( class_exists( 'OCSSL', false ) ) {
|
602 |
+
$plugin = "One Click SSL";
|
603 |
+
} elseif ( class_exists( 'JSM_Force_SSL', false ) ) {
|
604 |
+
$plugin = "JSM's Force HTTP to HTTPS (SSL)";
|
605 |
+
} elseif ( function_exists( 'httpsrdrctn_plugin_init' ) ) {
|
606 |
+
$plugin = "Easy HTTPS (SSL) Redirection";
|
607 |
+
} elseif ( defined( 'WPSSL_VER' ) ) {
|
608 |
+
$plugin = "WP Free SSL";
|
609 |
+
} elseif ( defined( 'WPFSSL_OPTIONS_KEY' ) ) {
|
610 |
+
$plugin = "WP Force SSL";
|
611 |
+
} elseif ( defined( 'ESSL_REQUIRED_PHP_VERSION' ) ) {
|
612 |
+
$plugin = "EasySSL";
|
613 |
+
}
|
614 |
+
|
615 |
+
if ( $plugin !== false ) {
|
616 |
+
$featurelist .= '<li><strong style="color:red">WARNING:</strong> ' . sprintf( __( 'We have detected the %s plugin on your website.', 'wp-letsencrypt-ssl' ), '<strong>' . $plugin . '</strong>' ) . ' ' . __( 'As WP Encryption handles all the functionality this plugin provides, we recommend to disable this plugin to prevent unexpected behaviour.', 'wp-letsencrypt-ssl' ) . '</li>';
|
617 |
+
}
|
618 |
+
update_option( "wple_ssl_errors", $error_count );
|
619 |
+
$featurelist .= '</ul>';
|
620 |
+
$scorecolor = ( $score >= 30 && $score <= 70 ? 'e2d754' : (( $score > 70 ? '67d467' : 'ff5252' )) );
|
621 |
+
$output = '<div class="wple-ssl-score">
|
622 |
+
<h2>SSL Score</h2>';
|
623 |
+
$output .= '<div class="wple-score">' . (int) $score . '</div>
|
624 |
+
<div class="wple-scorebar"><span data-width="' . (int) $score . '" style="width:' . (int) $score . '%;background:#' . esc_attr( $scorecolor ) . '"></span></div>';
|
625 |
+
$output .= $featurelist;
|
626 |
+
$output .= '</div>';
|
627 |
+
return $output;
|
628 |
+
}
|
629 |
+
|
630 |
+
private function wple_feature_check( $key )
|
631 |
+
{
|
632 |
+
switch ( $key ) {
|
633 |
+
case 'valid_ssl':
|
634 |
+
$rootdomain = WPLE_Trait::get_root_domain( false );
|
635 |
+
$client = WPLE_Trait::wple_verify_ssl( $rootdomain );
|
636 |
+
|
637 |
+
if ( $client || is_ssl() ) {
|
638 |
+
update_option( 'wple_ssl_valid', true );
|
639 |
+
return 1;
|
640 |
+
}
|
641 |
+
|
642 |
+
update_option( 'wple_ssl_valid', false );
|
643 |
+
break;
|
644 |
+
case 'ssl_redirect':
|
645 |
+
$rootdomain = WPLE_Trait::get_root_domain( false );
|
646 |
+
$gethead = wp_remote_head( 'http://' . $rootdomain, array(
|
647 |
+
'sslverify' => false,
|
648 |
+
'redirection' => 0,
|
649 |
+
'timeout' => 10,
|
650 |
+
) );
|
651 |
+
if ( is_wp_error( $gethead ) ) {
|
652 |
+
return 0;
|
653 |
+
}
|
654 |
+
$privatearray = $gethead['headers']->getAll();
|
655 |
+
if ( isset( $privatearray['location'] ) && untrailingslashit( $privatearray['location'] ) == 'https://' . $rootdomain ) {
|
656 |
+
return 1;
|
657 |
+
}
|
658 |
+
$opts = get_option( 'wple_opts' );
|
659 |
+
if ( FALSE !== $opts && isset( $opts['force_ssl'] ) && $opts['force_ssl'] >= 1 ) {
|
660 |
+
return 1;
|
661 |
+
}
|
662 |
+
break;
|
663 |
+
case 'mixed_content_fixer':
|
664 |
+
case 'hsts':
|
665 |
+
case 'security_headers':
|
666 |
+
if ( get_option( 'wple_' . $key ) ) {
|
667 |
+
return 1;
|
668 |
+
}
|
669 |
+
break;
|
670 |
+
case 'tls_version':
|
671 |
+
$tls = '1.2';
|
672 |
+
|
673 |
+
if ( function_exists( 'curl_init' ) ) {
|
674 |
+
$ch = curl_init( 'https://www.howsmyssl.com/a/check' );
|
675 |
+
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
676 |
+
curl_setopt( $ch, CURLOPT_TIMEOUT, 5 );
|
677 |
+
$json = curl_exec( $ch );
|
678 |
+
curl_close( $ch );
|
679 |
+
$json = json_decode( $json );
|
680 |
+
if ( !empty($json->tls_version) ) {
|
681 |
+
$tls = str_replace( "TLS ", "", $json->tls_version );
|
682 |
+
}
|
683 |
+
}
|
684 |
+
|
685 |
+
if ( version_compare( $tls, '1.2', '>=' ) ) {
|
686 |
+
return 1;
|
687 |
+
}
|
688 |
+
break;
|
689 |
+
case 'ssl_auto_renew':
|
690 |
+
break;
|
691 |
+
}
|
692 |
+
return 0;
|
693 |
+
}
|
694 |
+
|
695 |
+
private function wple_ssl_settings()
|
696 |
+
{
|
697 |
+
$sslopts = array(
|
698 |
+
'Enable Mixed Content Fixer' => [
|
699 |
+
'key' => 'mixed_content_fixer',
|
700 |
+
'desc' => 'Fixes basic mixed content issues like images, urls, stylesheets, etc.,',
|
701 |
+
],
|
702 |
+
'Upgrade Insecure Requests' => [
|
703 |
+
'key' => 'upgrade_insecure',
|
704 |
+
'desc' => 'Upgrades insecure HTTP requests to HTTPS',
|
705 |
+
],
|
706 |
+
'Enable HSTS Strict Transport Header' => [
|
707 |
+
'key' => 'hsts',
|
708 |
+
'desc' => 'HSTS Strict Transport blocks all insecure assets & resources which cannot be served over HTTPS',
|
709 |
+
],
|
710 |
+
'Enable Important Security Headers' => [
|
711 |
+
'key' => 'security_headers',
|
712 |
+
'desc' => 'Implements important security headers eliminating man in the middle attacks & improves site security',
|
713 |
+
],
|
714 |
+
);
|
715 |
+
$output = '<div class="wple-ssl-settings" data-update="' . wp_create_nonce( 'wplesettingsupdate' ) . '">
|
716 |
+
<h2>Settings</h2>';
|
717 |
+
$output .= '<ul>';
|
718 |
+
foreach ( $sslopts as $optlabel => $optarr ) {
|
719 |
+
$output .= '<li><label>' . esc_html( $optlabel ) . ' <span class="dashicons dashicons-editor-help wple-tooltip" data-tippy="' . esc_attr( $optarr['desc'] ) . '"></span></label>';
|
720 |
+
$output .= '<div class="plan-toggler" style="text-align: left; margin: 40px 0 0px;">
|
721 |
+
<span></span>
|
722 |
+
<label class="toggle">
|
723 |
+
<input class="toggle-checkbox wple-setting" data-opt="' . esc_attr( $optarr['key'] ) . '" type="checkbox" ' . checked( get_option( "wple_" . esc_attr( $optarr['key'] ) ), "1", false ) . '>
|
724 |
+
<div class="toggle-switch" style="transform: scale(0.7);"></div>
|
725 |
+
|
726 |
+
</label>
|
727 |
+
</div>';
|
728 |
+
$output .= '</li>';
|
729 |
+
}
|
730 |
+
$output .= '<li class="wple-setting-error"><label>' . __( 'You must have a valid SSL certificate installed on your site before enabling this feature', 'wp-letsencrypt-ssl' ) . '!.</label></li>';
|
731 |
+
$output .= '</ul>';
|
732 |
+
$output .= '</div>';
|
733 |
+
return $output;
|
734 |
+
}
|
735 |
+
|
736 |
+
public function wple_update_settings()
|
737 |
+
{
|
738 |
+
|
739 |
+
if ( !current_user_can( 'manage_options' ) || !wp_verify_nonce( $_POST['nc'], 'wplesettingsupdate' ) ) {
|
740 |
+
echo 0 ;
|
741 |
+
exit;
|
742 |
+
}
|
743 |
+
|
744 |
+
$opt = $_POST['opt'];
|
745 |
+
$val = (int) $_POST['val'];
|
746 |
+
$allowed = array(
|
747 |
+
'mixed_content_fixer',
|
748 |
+
'hsts',
|
749 |
+
'security_headers',
|
750 |
+
'upgrade_insecure'
|
751 |
+
);
|
752 |
+
|
753 |
+
if ( !in_array( $opt, $allowed ) ) {
|
754 |
+
echo 0 ;
|
755 |
+
exit;
|
756 |
+
}
|
757 |
+
|
758 |
+
$out = 0;
|
759 |
+
|
760 |
+
if ( $val == 0 ) {
|
761 |
+
delete_option( "wple_" . $opt );
|
762 |
+
if ( $opt != 'upgrade_insecure' ) {
|
763 |
+
$out = -10;
|
764 |
+
}
|
765 |
+
$this->wple_addremove_security_headers( $out, $opt, $val );
|
766 |
+
} else {
|
767 |
+
if ( $opt != 'upgrade_insecure' ) {
|
768 |
+
$out = 10;
|
769 |
+
}
|
770 |
+
|
771 |
+
if ( false == get_option( 'wple_ssl_valid' ) ) {
|
772 |
+
$out = 1;
|
773 |
+
echo $out ;
|
774 |
+
exit;
|
775 |
+
}
|
776 |
+
|
777 |
+
update_option( "wple_" . $opt, 1 );
|
778 |
+
$this->wple_addremove_security_headers( $out, $opt, $val );
|
779 |
+
}
|
780 |
+
|
781 |
+
echo $out ;
|
782 |
+
exit;
|
783 |
+
}
|
784 |
+
|
785 |
+
private function wple_addremove_security_headers( &$out, $opt, $val )
|
786 |
+
{
|
787 |
+
|
788 |
+
if ( $opt == 'security_headers' ) {
|
789 |
+
|
790 |
+
if ( !is_writable( ABSPATH . '.htaccess' ) ) {
|
791 |
+
delete_option( 'wple_security_headers' );
|
792 |
+
$out = 'htaccessnotwritable';
|
793 |
+
return $out;
|
794 |
+
}
|
795 |
+
|
796 |
+
|
797 |
+
if ( $val == 1 && FALSE === get_option( 'wple_spmode_activated' ) ) {
|
798 |
+
//add request
|
799 |
+
|
800 |
+
if ( is_writable( ABSPATH . '.htaccess' ) ) {
|
801 |
+
WPLE_Trait::wple_clean_security_headers();
|
802 |
+
$htaccess = file_get_contents( ABSPATH . '.htaccess' );
|
803 |
+
$getrules = WPLE_Trait::compose_htaccess_security_rules();
|
804 |
+
$wpruleset = "# BEGIN WordPress";
|
805 |
+
|
806 |
+
if ( strpos( $htaccess, $wpruleset ) !== false ) {
|
807 |
+
$newhtaccess = str_replace( $wpruleset, $getrules . $wpruleset, $htaccess );
|
808 |
+
} else {
|
809 |
+
$newhtaccess = $htaccess . $getrules;
|
810 |
+
}
|
811 |
+
|
812 |
+
insert_with_markers( ABSPATH . '.htaccess', '', $newhtaccess );
|
813 |
+
}
|
814 |
+
|
815 |
+
} else {
|
816 |
+
//remove request
|
817 |
+
WPLE_Trait::wple_clean_security_headers();
|
818 |
+
}
|
819 |
+
|
820 |
+
return $out;
|
821 |
+
}
|
822 |
+
|
823 |
+
}
|
824 |
+
|
825 |
+
public function wple_ssl_toolbar( $admin_bar )
|
826 |
+
{
|
827 |
+
$ecount = get_option( 'wple_ssl_errors' );
|
828 |
+
$notifications = ( FALSE !== $ecount ? '<span class="ab-label">' . (int) $ecount . '</span>' : '' );
|
829 |
+
$admin_bar->add_menu( array(
|
830 |
+
'id' => 'wple-ssl-health',
|
831 |
+
'title' => "SSL {$notifications}",
|
832 |
+
'href' => admin_url( 'admin.php?page=wp_encryption_ssl_health' ),
|
833 |
+
'meta' => array(
|
834 |
+
'title' => __( 'SSL Health' ),
|
835 |
+
),
|
836 |
+
) );
|
837 |
+
}
|
838 |
+
|
839 |
+
}
|
cabundle/ca.crt
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-----BEGIN CERTIFICATE-----
|
2 |
+
MIIFFjCCAv6gAwIBAgIRAJErCErPDBinU/bWLiWnX1owDQYJKoZIhvcNAQELBQAw
|
3 |
+
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
|
4 |
+
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMjAwOTA0MDAwMDAw
|
5 |
+
WhcNMjUwOTE1MTYwMDAwWjAyMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNTGV0J3Mg
|
6 |
+
RW5jcnlwdDELMAkGA1UEAxMCUjMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
|
7 |
+
AoIBAQC7AhUozPaglNMPEuyNVZLD+ILxmaZ6QoinXSaqtSu5xUyxr45r+XXIo9cP
|
8 |
+
R5QUVTVXjJ6oojkZ9YI8QqlObvU7wy7bjcCwXPNZOOftz2n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szue5L3sz85K+EC4Y/wFVDNvZo4TYXao6Z0f+lQKc0t8DQYzk1OXVu8rp2
|
24 |
+
yJMC6alLbBfODALZvYH7n7do1AZls4I9d1P4jnkDrQoxB3UqQ9hVl3LEKQ73xF1O
|
25 |
+
yK5GhDDX8oVfGKF5u+decIsH4YaTw7mP3GFxJSqv3+0lUFJoi5Lc5da149p90Ids
|
26 |
+
hCExroL1+7mryIkXPeFM5TgO9r0rvZaBFOvV2z0gp35Z0+L4WPlbuEjN/lxPFin+
|
27 |
+
HlUjr8gRsI3qfJOQFy/9rKIJR0Y/8Omwt/8oTWgy1mdeHmmjk7j1nYsvC9JSQ6Zv
|
28 |
+
MldlTTKB3zhThV1+XWYp6rjd5JW1zbVWEkLNxE7GJThEUG3szgBVGP7pSWTUTsqX
|
29 |
+
nLRbwHOoq7hHwg==
|
30 |
+
-----END CERTIFICATE-----
|
cabundle/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Silence is golden
|
classes/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Silence is golden
|
classes/le-activator.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 4.3.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
class WPLE_Activator
|
28 |
+
{
|
29 |
+
public static function activate( $networkwide )
|
30 |
+
{
|
31 |
+
// if (wple_fs()->is__premium_only()) {
|
32 |
+
// global $wple_fs;
|
33 |
+
// $thissite = $wple_fs->get_site();
|
34 |
+
// $lkey = $wple_fs->_get_license_by_id($thissite->license_id);
|
35 |
+
// if (is_multisite() && $networkwide && $lkey->pricing_id != 10873) {
|
36 |
+
// wp_die('WP Encryption cannot be activated network wide unless you have UNLIMITED sites plan. Please upgrade your current plan or activate on your individual sites.');
|
37 |
+
// }
|
38 |
+
// }
|
39 |
+
// if (!wple_fs()->is__premium_only()) {
|
40 |
+
// if (is_multisite() && $networkwide) {
|
41 |
+
// wp_die('WP Encryption cannot be activated network wide. Please activate on your individual sites.');
|
42 |
+
// }
|
43 |
+
// }
|
44 |
+
$opts = ( get_option( 'wple_opts' ) === FALSE ? array(
|
45 |
+
'expiry' => '',
|
46 |
+
) : get_option( 'wple_opts' ) );
|
47 |
+
//initial disable ssl forcing
|
48 |
+
///$opts['force_ssl'] = 0;
|
49 |
+
update_option( 'wple_opts', $opts );
|
50 |
+
update_option( 'wple_version', WPLE_PLUGIN_VERSION );
|
51 |
+
WPLE_Trait::wple_cpanel_identity();
|
52 |
+
if ( isset( $opts['expiry'] ) && $opts['expiry'] != '' && !wp_next_scheduled( 'wple_ssl_reminder_notice' ) ) {
|
53 |
+
wp_schedule_single_event( strtotime( '-10 day', strtotime( $opts['expiry'] ) ), 'wple_ssl_reminder_notice' );
|
54 |
+
}
|
55 |
+
}
|
56 |
+
|
57 |
+
}
|
classes/le-advanced-scanner.php
ADDED
@@ -0,0 +1,381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty. All Rights Reserved.
|
8 |
+
* @link https://gowebsmarty.com
|
9 |
+
* @since Class available since Release 5.7.0
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
|
13 |
+
class WPLE_DeepScanner
|
14 |
+
{
|
15 |
+
private $permalinks_list = [];
|
16 |
+
private $insecure_links_within_posts = [];
|
17 |
+
private $permalink_vs_mxresource = [];
|
18 |
+
private $permalink_vs_inlinemx = [];
|
19 |
+
private $widget_issues = [];
|
20 |
+
private $merged_widget_issues = [];
|
21 |
+
|
22 |
+
public function __construct()
|
23 |
+
{
|
24 |
+
$this->get_all_permalinks();
|
25 |
+
|
26 |
+
if (!empty($this->permalinks_list)) {
|
27 |
+
foreach ($this->permalinks_list as $PID => $link) {
|
28 |
+
$webpage = $this->retrieve_content($link);
|
29 |
+
$this->parse_content_for_http_links($PID, $link, $webpage);
|
30 |
+
$this->find_inline_insecure_items($PID, $link, $webpage);
|
31 |
+
}
|
32 |
+
}
|
33 |
+
|
34 |
+
//$this->p($this->insecure_links_within_posts);
|
35 |
+
$this->find_widgets_insecure_items();
|
36 |
+
//$this->p($this->widget_issues);
|
37 |
+
///$this->p($this->merged_widget_issues);
|
38 |
+
//$this->p($this->permalink_vs_mxresource);
|
39 |
+
//$this->p($this->permalink_vs_inlinemx);
|
40 |
+
|
41 |
+
//Table starts
|
42 |
+
if (empty($this->permalink_vs_mxresource)) {
|
43 |
+
delete_option('wple_mixed_issues');
|
44 |
+
echo 'success';
|
45 |
+
}
|
46 |
+
|
47 |
+
//have issues
|
48 |
+
|
49 |
+
update_option('wple_mixed_issues', 1);
|
50 |
+
|
51 |
+
$table = '<table id="wple-advanced-scanner">
|
52 |
+
<th>Type</th>
|
53 |
+
<th>Insecure URL<br><small>URLs that needs updating to <strong>https://</strong></small></th>
|
54 |
+
<th>Source</th>';
|
55 |
+
|
56 |
+
foreach ($this->permalink_vs_mxresource as $ID => $research) {
|
57 |
+
$table .= '<tr>
|
58 |
+
<td colspan="3" class="wple-scan-head">Analyzed Page: ' . esc_url($research['webpage']) . ' (ID=' . (int) $ID . ')</td>
|
59 |
+
</tr>';
|
60 |
+
|
61 |
+
foreach ($research['mx_resources'] as $key => $data) {
|
62 |
+
|
63 |
+
if ($key == 'secure_css' || $key == 'secure_js') { //insecure items within secure files
|
64 |
+
foreach ($data as $key => $files_w_issue) {
|
65 |
+
$table .= '<tr>
|
66 |
+
<td class="issue_type">' . esc_html__('Insecure links within css/js files', 'wp-letsencrypt-ssl') . '</td>';
|
67 |
+
$rcount = 1;
|
68 |
+
foreach ($files_w_issue['issues'] as $key => $items) {
|
69 |
+
$table .= '<td>http://' . implode("<br>http://", $items) . '</td>';
|
70 |
+
$rcount++;
|
71 |
+
}
|
72 |
+
$table .= '<td class="wple-tooltip" data-tippy="Find & fix these insecure urls via Appearance ~ Theme Editor">' . esc_url($files_w_issue['resource']) . '</td>';
|
73 |
+
$table .= '</tr>';
|
74 |
+
}
|
75 |
+
} else {
|
76 |
+
|
77 |
+
$tds = '';
|
78 |
+
$tdcount = 1;
|
79 |
+
foreach ($data as $resource) {
|
80 |
+
if (stripos($resource, '/svg')) {
|
81 |
+
continue;
|
82 |
+
}
|
83 |
+
|
84 |
+
$issue_location = '';
|
85 |
+
$issue_tooltip = 'Try updating Site & WordPress urls to https:// protocol in Settings > General to resolve this issue. Likewise, this could be coming from your active theme files or active plugin files.';
|
86 |
+
|
87 |
+
if (in_array($resource, $this->merged_widget_issues)) {
|
88 |
+
$issue_location = '<a href="' . admin_url("widgets.php") . '" target="_blank">WIDGET</a>';
|
89 |
+
$issue_tooltip = 'Update this insecure url via Appearance > Widgets on left sidebar';
|
90 |
+
}
|
91 |
+
|
92 |
+
if (isset($this->insecure_links_within_posts[$ID])) {
|
93 |
+
foreach ($this->insecure_links_within_posts[$ID] as $type => $items) {
|
94 |
+
if (in_array($resource, $items)) {
|
95 |
+
$ID = (int) $ID;
|
96 |
+
$issue_location = '<a href="' . admin_url("post.php?post=$ID&action=edit") . '" target="_blank">POST CONTENT</a>';
|
97 |
+
$issue_tooltip = 'Update this insecure url via Edit Post';
|
98 |
+
}
|
99 |
+
}
|
100 |
+
}
|
101 |
+
|
102 |
+
if (isset($this->permalink_vs_inlinemx[$ID])) {
|
103 |
+
foreach ($this->permalink_vs_inlinemx[$ID]['mx_resources'] as $indx => $arr) {
|
104 |
+
if (in_array($resource, $arr)) {
|
105 |
+
$issue_location = 'INLINE STYLE / SCRIPT';
|
106 |
+
$issue_tooltip = 'This issue is found within webpage html and might be coming from custom css / js section of your active theme or plugins.';
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
|
111 |
+
$tds .= '<tr><td>' . esc_url($resource) . '</td><td class="wple-tooltip" data-tippy="' . esc_attr($issue_tooltip) . '">' . $issue_location . '</td></tr>';
|
112 |
+
$tdcount++;
|
113 |
+
}
|
114 |
+
$table .= '<tr>
|
115 |
+
<td rowspan="' . $tdcount . '" class="issue_type">' . esc_html($key) . '</td>
|
116 |
+
' . $tds . '
|
117 |
+
</tr>';
|
118 |
+
}
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
$table .= '</table>';
|
123 |
+
|
124 |
+
echo wp_kses_post($table);
|
125 |
+
}
|
126 |
+
|
127 |
+
private function get_all_permalinks()
|
128 |
+
{
|
129 |
+
global $wpdb;
|
130 |
+
$ptypes_query = array();
|
131 |
+
$args = array(
|
132 |
+
'public' => true,
|
133 |
+
);
|
134 |
+
|
135 |
+
$ptypes = get_post_types($args);
|
136 |
+
foreach ($ptypes as $post_type) {
|
137 |
+
$ptypes_query[] = " post_type = '" . $post_type . "'";
|
138 |
+
}
|
139 |
+
|
140 |
+
$sql = implode(" OR ", $ptypes_query);
|
141 |
+
$sql = "SELECT ID, post_content FROM $wpdb->posts where post_status='publish' and (" . $sql . ") LIMIT 25";
|
142 |
+
|
143 |
+
$res = $wpdb->get_results($sql);
|
144 |
+
|
145 |
+
if (!empty($res)) {
|
146 |
+
foreach ($res as $item) {
|
147 |
+
if (@!in_array(get_permalink($item->ID), $this->permalinks_list))
|
148 |
+
$this->permalinks_list[$item->ID] = get_permalink($item->ID);
|
149 |
+
}
|
150 |
+
|
151 |
+
$this->locate_insecure_items_in_posts($res);
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
private function locate_insecure_items_in_posts($results)
|
156 |
+
{
|
157 |
+
$url_pattern = '([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?)(?:[\'|\"])';
|
158 |
+
$image_pattern = '([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?[.jpg|.gif|.jpeg|.png|.svg])(?:((\?.*[\'|"])|[\'|"]))';
|
159 |
+
$script_pattern = '([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?[.js])(?:((\?.*[\'|\"])|[\'|\"]))';
|
160 |
+
$style_pattern = '([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?[.css])(?:((\?.*[\'|\"])|[\'|\"]))';
|
161 |
+
|
162 |
+
$patterns = array(
|
163 |
+
'inline_css' => '/url\([\'"]?\K(http:\/\/)()' . $image_pattern . '/i',
|
164 |
+
'link' => '/<link[^>].*?href=[\'"]\K(http:\/\/)()' . $style_pattern . '/i',
|
165 |
+
'meta' => '/<meta property="og:image" .*?content=[\'"]\K(http:\/\/)()' . $image_pattern . '/i',
|
166 |
+
'img' => '/<(?:img)[^>].*?src=[\'"]\K(http:\/\/)()' . $image_pattern . '/i',
|
167 |
+
'iframe' => '/<(?:iframe)[^>].*?src=[\'"]\K(http:\/\/)()' . $url_pattern . '/i',
|
168 |
+
'script' => '/<script[^>]*?src=[\'"]\K(http:\/\/)()' . $script_pattern . '/i',
|
169 |
+
'form' => '/<form[^>]*?action=[\'"]\K(http:\/\/)()' . $url_pattern . '/i',
|
170 |
+
'inline_js' => '/"url":"\K(http:\/\/)()' . $image_pattern . '/i',
|
171 |
+
);
|
172 |
+
|
173 |
+
foreach ($results as $res) {
|
174 |
+
foreach ($patterns as $key => $pattern) {
|
175 |
+
$matches = [];
|
176 |
+
if (preg_match_all($pattern, $res->post_content, $matches, PREG_PATTERN_ORDER)) {
|
177 |
+
$this->insecure_links_within_posts[$res->ID][$key] = $matches[3];
|
178 |
+
}
|
179 |
+
}
|
180 |
+
}
|
181 |
+
}
|
182 |
+
|
183 |
+
private function retrieve_content($url)
|
184 |
+
{
|
185 |
+
|
186 |
+
if (strpos($url, "//") === 0) $url = "https:" . $url;
|
187 |
+
|
188 |
+
$home = WPLE_Trait::get_root_domain(false);
|
189 |
+
if (strpos($url, $home) !== FALSE) {
|
190 |
+
$url = add_query_arg('wpen_scan', time(), $url);
|
191 |
+
}
|
192 |
+
|
193 |
+
$res = wp_remote_get($url);
|
194 |
+
$maincontent = "";
|
195 |
+
|
196 |
+
if (is_array($res)) {
|
197 |
+
$maincontent = wp_remote_retrieve_body($res);
|
198 |
+
}
|
199 |
+
|
200 |
+
if (is_wp_error($res)) {
|
201 |
+
return '';
|
202 |
+
}
|
203 |
+
|
204 |
+
return $maincontent;
|
205 |
+
}
|
206 |
+
|
207 |
+
private function parse_content_for_http_links($pid, $link, $content)
|
208 |
+
{
|
209 |
+
$patterns = array(
|
210 |
+
"/(http:\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?[.jpg|.gif|.jpeg|.png])(?:((\?.*[\'|\"])|['|\"]))/",
|
211 |
+
"/(http:\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?\.mp4)(?:((\?.*[\'|\"])|['|\"]))/",
|
212 |
+
"/(http:\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?\.js)(?:((\?.*[\'|\"])|['|\"]))/",
|
213 |
+
"/(http:\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?\.css)(?:((\?.*[\'|\"])|['|\"]))/",
|
214 |
+
);
|
215 |
+
|
216 |
+
$mx_resources = [];
|
217 |
+
$matches = [];
|
218 |
+
$count = 0;
|
219 |
+
foreach ($patterns as $pattern) {
|
220 |
+
$key = ($count == 2) ? 'insecure_js' : ($count == 3 ? 'insecure_css' : 'insecure_images');
|
221 |
+
if (preg_match_all($pattern, $content, $matches, PREG_PATTERN_ORDER)) {
|
222 |
+
$mx_resources[$key] = $matches[2];
|
223 |
+
}
|
224 |
+
$count++;
|
225 |
+
}
|
226 |
+
|
227 |
+
|
228 |
+
$patterns = array(
|
229 |
+
"/(http:\/\/|https:\/\/|\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?\.js)(?:((\?.*[\'|\"])|['|\"]))/",
|
230 |
+
"/(http:\/\/|https:\/\/|\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?\.css)(?:((\?.*[\'|\"])|['|\"]))/",
|
231 |
+
);
|
232 |
+
$all_cssjs_files = [];
|
233 |
+
foreach ($patterns as $index => $pattern) {
|
234 |
+
$key = ($index == 0) ? 'secure_js' : 'secure_css';
|
235 |
+
if (preg_match_all($pattern, $content, $matches, PREG_PATTERN_ORDER)) {
|
236 |
+
$all_cssjs_files[$key] = $matches[2];
|
237 |
+
}
|
238 |
+
}
|
239 |
+
|
240 |
+
foreach ($all_cssjs_files as $key => $items) {
|
241 |
+
|
242 |
+
foreach ($items as $index => $cssjsfile) {
|
243 |
+
$foundissues = $this->check_mxissues_within_cssjs('https://' . $cssjsfile);
|
244 |
+
if (!empty($foundissues)) {
|
245 |
+
$mx_resources[$key][$index] = [
|
246 |
+
'resource' => $cssjsfile,
|
247 |
+
'issues' => $foundissues
|
248 |
+
];
|
249 |
+
}
|
250 |
+
}
|
251 |
+
}
|
252 |
+
|
253 |
+
$this->permalink_vs_mxresource[$pid] = [
|
254 |
+
'webpage' => $link,
|
255 |
+
'mx_resources' => $mx_resources
|
256 |
+
];
|
257 |
+
}
|
258 |
+
|
259 |
+
private function check_mxissues_within_cssjs($cssjs_url)
|
260 |
+
{
|
261 |
+
$url_pattern = '([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?)';
|
262 |
+
$patterns = array(
|
263 |
+
'/url\([\'"]?\K(http:\/\/)' . $url_pattern . '/i',
|
264 |
+
'/<script [^>]*?src=[\'"]\K(http:\/\/)' . $url_pattern . '/i',
|
265 |
+
'/<meta property="og:image" .*?content=[\'"]\K(http:\/\/)' . $url_pattern . '/i',
|
266 |
+
'/<(?:img|iframe)[^>].*?src=[\'"]\K(http:\/\/)' . $url_pattern . '/i',
|
267 |
+
'/<link [^>].*?href=[\'"]\K(http:\/\/)' . $url_pattern . '/i',
|
268 |
+
);
|
269 |
+
|
270 |
+
$filestr = file_get_contents($cssjs_url);
|
271 |
+
|
272 |
+
$totalmatches = [];
|
273 |
+
foreach ($patterns as $pattern) {
|
274 |
+
$matches = [];
|
275 |
+
if (preg_match_all($pattern, $filestr, $matches, PREG_PATTERN_ORDER)) {
|
276 |
+
$totalmatches[] = $matches[2];
|
277 |
+
}
|
278 |
+
}
|
279 |
+
|
280 |
+
return $totalmatches;
|
281 |
+
}
|
282 |
+
|
283 |
+
private function find_inline_insecure_items($pid, $link, $webpage)
|
284 |
+
{
|
285 |
+
$url_pattern = '([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?)(?:[\'|\"])';
|
286 |
+
$image_pattern = '([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?[.jpg|.gif|.jpeg|.png|.svg])(?:((\?.*[\'|"])|[\'|"]))';
|
287 |
+
|
288 |
+
$patterns = array(
|
289 |
+
'/url\([\'"]?\K(http:\/\/)' . $image_pattern . '/i',
|
290 |
+
'/<(?:iframe)[^>].*?src=[\'"]\K(http:\/\/)' . $url_pattern . '/i',
|
291 |
+
'/<form[^>]*?action=[\'"]\K(http:\/\/)' . $url_pattern . '/i',
|
292 |
+
);
|
293 |
+
|
294 |
+
$type = 'inline_style';
|
295 |
+
$count = 0;
|
296 |
+
$inline_issues = [];
|
297 |
+
foreach ($patterns as $pattern) {
|
298 |
+
$type = ($count == 1) ? 'inline_iframe' : ($count == 2 ? 'inline_form' : '');
|
299 |
+
$matches = [];
|
300 |
+
if (preg_match_all($pattern, $webpage, $matches, PREG_PATTERN_ORDER)) {
|
301 |
+
$inline_issues[$type] = $matches[2];
|
302 |
+
}
|
303 |
+
|
304 |
+
$count++;
|
305 |
+
}
|
306 |
+
|
307 |
+
$this->permalink_vs_inlinemx[$pid] = [
|
308 |
+
'webpage' => $link,
|
309 |
+
'mx_resources' => $inline_issues
|
310 |
+
];
|
311 |
+
}
|
312 |
+
|
313 |
+
private function find_widgets_insecure_items()
|
314 |
+
{
|
315 |
+
$widget_areas = wp_get_sidebars_widgets();
|
316 |
+
|
317 |
+
foreach ($widget_areas as $widgets) {
|
318 |
+
foreach ($widgets as $widget_title) {
|
319 |
+
$widget_data = $this->get_widget_data($widget_title);
|
320 |
+
|
321 |
+
if ($widget_data) {
|
322 |
+
$patterns = array( //unable to detect embed widget
|
323 |
+
"images" => "/(http:\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?[.jpg|.gif|.jpeg|.png|.svg])(?:((\?.*[\'|\"])|['|\"]))/",
|
324 |
+
"video" => "/(http:\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?\.mp4)(?:((\?.*[\'|\"])|['|\"]))/",
|
325 |
+
"js" => "/(http:\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?\.js)(?:((\?.*[\'|\"])|['|\"]))/",
|
326 |
+
"css" => "/(http:\/\/)([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-]?\.css)(?:((\?.*[\'|\"])|['|\"]))/",
|
327 |
+
);
|
328 |
+
|
329 |
+
foreach ($patterns as $type => $pattern) {
|
330 |
+
$matches = [];
|
331 |
+
if (preg_match_all($pattern, $widget_data['html'], $matches, PREG_PATTERN_ORDER)) {
|
332 |
+
$this->widget_issues[$widget_data['type'] . '-' . $widget_data['id']][] = $matches[2];
|
333 |
+
$this->merged_widget_issues = array_merge($this->merged_widget_issues, $matches[2]);
|
334 |
+
}
|
335 |
+
}
|
336 |
+
}
|
337 |
+
}
|
338 |
+
}
|
339 |
+
}
|
340 |
+
|
341 |
+
public function get_widget_data($title)
|
342 |
+
{
|
343 |
+
|
344 |
+
$type = substr($title, 0, strpos($title, '-'));
|
345 |
+
$id = substr($title, strpos($title, '-') + 1);
|
346 |
+
|
347 |
+
$widget_array = get_option("widget_" . $type);
|
348 |
+
$widget_html = "";
|
349 |
+
$widget_title = "";
|
350 |
+
|
351 |
+
$type_found = false;
|
352 |
+
if (isset($widget_array[$id]["content"])) {
|
353 |
+
$type_found = true;
|
354 |
+
$widget_html = $widget_array[$id]["content"];
|
355 |
+
}
|
356 |
+
|
357 |
+
if (isset($widget_array[$id]["url"])) {
|
358 |
+
$type_found = true;
|
359 |
+
$widget_html = $widget_array[$id]["url"];
|
360 |
+
}
|
361 |
+
if (isset($widget_array[$id]["text"])) {
|
362 |
+
$type_found = true;
|
363 |
+
$widget_html = $widget_array[$id]["text"];
|
364 |
+
}
|
365 |
+
|
366 |
+
if (isset($widget_array[$id]["title"])) {
|
367 |
+
$widget_title = $widget_array[$id]["title"];
|
368 |
+
}
|
369 |
+
|
370 |
+
if (isset($widget_array[$id]["html"])) {
|
371 |
+
$type_found = true;
|
372 |
+
$widget_html = $widget_array[$id]["html"];
|
373 |
+
}
|
374 |
+
|
375 |
+
if ($type_found) {
|
376 |
+
return array("type" => $type, "id" => $id, "html" => $widget_html, "title" => $widget_title);
|
377 |
+
} else {
|
378 |
+
return false;
|
379 |
+
}
|
380 |
+
}
|
381 |
+
}
|
classes/le-core.php
ADDED
@@ -0,0 +1,743 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 1.0.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
/**
|
28 |
+
* Autoloader
|
29 |
+
*
|
30 |
+
* @since 5.1.1
|
31 |
+
*/
|
32 |
+
require_once plugin_dir_path(__DIR__) . 'vendor/autoload.php';
|
33 |
+
/**
|
34 |
+
* require all the lib files for generating certs
|
35 |
+
*/
|
36 |
+
|
37 |
+
use WPLEClient\LEFunctions;
|
38 |
+
use WPLEClient\LEConnector;
|
39 |
+
use WPLEClient\LEAccount;
|
40 |
+
use WPLEClient\LEAuthorization;
|
41 |
+
use WPLEClient\LEClient;
|
42 |
+
use WPLEClient\LEOrder;
|
43 |
+
|
44 |
+
require_once WPLE_DIR . 'classes/le-trait.php';
|
45 |
+
/**
|
46 |
+
* WPLE_Core class
|
47 |
+
* Responsible for handling account registration, certificate generation & install certs on cPanel
|
48 |
+
*
|
49 |
+
* @since 1.0.0
|
50 |
+
*/
|
51 |
+
class WPLE_Core
|
52 |
+
{
|
53 |
+
protected $email;
|
54 |
+
protected $date;
|
55 |
+
protected $basedomain;
|
56 |
+
protected $domains;
|
57 |
+
protected $mdomain = false;
|
58 |
+
protected $rootdomain;
|
59 |
+
protected $client;
|
60 |
+
protected $order;
|
61 |
+
protected $pendings;
|
62 |
+
protected $wcard = false;
|
63 |
+
protected $dnss = false;
|
64 |
+
protected $iscron = false;
|
65 |
+
protected $noscriptresponse = false;
|
66 |
+
protected $disablespmode = false;
|
67 |
+
/**
|
68 |
+
* construct all params & proceed with cert generation
|
69 |
+
*
|
70 |
+
* @since 1.0.0
|
71 |
+
* @param array $opts
|
72 |
+
* @param boolean $gen
|
73 |
+
*/
|
74 |
+
public function __construct(
|
75 |
+
$opts = array(),
|
76 |
+
$gen = true,
|
77 |
+
$wc = false,
|
78 |
+
$dnsverify = false
|
79 |
+
) {
|
80 |
+
|
81 |
+
if (!empty($opts)) {
|
82 |
+
$this->email = sanitize_email($opts['email']);
|
83 |
+
$this->date = $opts['date'];
|
84 |
+
$optss = $opts;
|
85 |
+
} else {
|
86 |
+
$optss = get_option('wple_opts');
|
87 |
+
$this->email = (isset($optss['email']) ? sanitize_email($optss['email']) : '');
|
88 |
+
$this->date = (isset($optss['date']) ? $optss['date'] : '');
|
89 |
+
}
|
90 |
+
|
91 |
+
if (isset($optss['type']) && $optss['type'] == 'wildcard') {
|
92 |
+
$wc = true;
|
93 |
+
}
|
94 |
+
$siteurl = site_url();
|
95 |
+
if (isset($optss['subdir'])) {
|
96 |
+
$siteurl = sanitize_text_field($optss['domain']);
|
97 |
+
}
|
98 |
+
$this->rootdomain = str_ireplace(array('http://', 'https://', 'www.'), array('', '', ''), $siteurl);
|
99 |
+
$this->basedomain = str_ireplace(array('http://', 'https://'), array('', ''), $siteurl);
|
100 |
+
$this->domains = array($this->basedomain);
|
101 |
+
//include both www & non-www
|
102 |
+
|
103 |
+
if (isset($optss['include_www']) && $optss['include_www'] == 1) {
|
104 |
+
$this->basedomain = $this->rootdomain;
|
105 |
+
$this->domains = array($this->rootdomain, 'www.' . $this->rootdomain);
|
106 |
+
}
|
107 |
+
|
108 |
+
/** v5.4.8 */
|
109 |
+
if (isset($optss['include_mail']) && $optss['include_mail'] == 1) {
|
110 |
+
$this->domains[] = 'mail.' . $this->rootdomain;
|
111 |
+
}
|
112 |
+
if (isset($optss['include_webmail']) && $optss['include_webmail'] == 1) {
|
113 |
+
$this->domains[] = 'webmail.' . $this->rootdomain;
|
114 |
+
}
|
115 |
+
if ($dnsverify) {
|
116 |
+
//manual dns verify
|
117 |
+
$this->dnss = true;
|
118 |
+
}
|
119 |
+
if (get_option('wple_disable_spmode') == true) {
|
120 |
+
$this->disablespmode = true;
|
121 |
+
}
|
122 |
+
if ($gen) {
|
123 |
+
$this->wple_generate_verify_ssl();
|
124 |
+
}
|
125 |
+
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* group all different steps into one function & clear debug.log intially.
|
129 |
+
*
|
130 |
+
* @since 1.0.0
|
131 |
+
* @return void
|
132 |
+
*/
|
133 |
+
public function wple_generate_verify_ssl()
|
134 |
+
{
|
135 |
+
delete_option('wple_complete');
|
136 |
+
$init = (int) get_option('wple_have_cpanel');
|
137 |
+
//since 4.7
|
138 |
+
|
139 |
+
if (!isset($_GET['wpleauto'])) {
|
140 |
+
update_option('wple_http_valid', 0);
|
141 |
+
|
142 |
+
if (isset($_POST['wple_send_usage'])) {
|
143 |
+
update_option('wple_send_usage', 1);
|
144 |
+
} else {
|
145 |
+
update_option('wple_send_usage', 0);
|
146 |
+
}
|
147 |
+
|
148 |
+
$PRO = (wple_fs()->can_use_premium_code__premium_only() ? 'PRO' : '');
|
149 |
+
$PRO .= ($this->wcard ? ' WILDCARD SSL ' : ' SINGLE DOMAIN SSL ');
|
150 |
+
$PRO .= $init;
|
151 |
+
$this->wple_log('<b>' . WPLE_PLUGIN_VERSION . ' ' . $PRO . ' - ' . esc_html(site_url()) . '</b>', 'success', 'w');
|
152 |
+
$this->wple_log("Domain covered:\n" . json_encode($this->domains) . "\n");
|
153 |
+
}
|
154 |
+
|
155 |
+
$this->wple_create_client();
|
156 |
+
$this->wple_generate_order();
|
157 |
+
$this->wple_verify_pending_orders();
|
158 |
+
$this->wple_generate_certs();
|
159 |
+
if (FALSE != ($dlog = get_option('wple_send_usage')) && $dlog) {
|
160 |
+
$this->wple_send_usage_data();
|
161 |
+
}
|
162 |
+
}
|
163 |
+
|
164 |
+
/**
|
165 |
+
* create ACMEv2 client
|
166 |
+
*
|
167 |
+
* @since 1.0.0
|
168 |
+
* @return void
|
169 |
+
*/
|
170 |
+
protected function wple_create_client()
|
171 |
+
{
|
172 |
+
try {
|
173 |
+
$keydir = ABSPATH . 'keys/';
|
174 |
+
$this->client = new LEClient(
|
175 |
+
$this->email,
|
176 |
+
false,
|
177 |
+
LEClient::LOG_STATUS,
|
178 |
+
$keydir
|
179 |
+
);
|
180 |
+
} catch (Exception $e) {
|
181 |
+
update_option('wple_error', 1);
|
182 |
+
$this->wple_log(
|
183 |
+
"CREATE_CLIENT:" . $e,
|
184 |
+
'error',
|
185 |
+
'w',
|
186 |
+
true
|
187 |
+
);
|
188 |
+
}
|
189 |
+
///echo '<pre>'; print_r( $client->getAccount() ); echo '</pre>';
|
190 |
+
}
|
191 |
+
|
192 |
+
/**
|
193 |
+
* Generate order with ACMEv2 client for given domain
|
194 |
+
*
|
195 |
+
* @since 1.0.0
|
196 |
+
* @return void
|
197 |
+
*/
|
198 |
+
protected function wple_generate_order()
|
199 |
+
{
|
200 |
+
try {
|
201 |
+
$this->order = $this->client->getOrCreateOrder($this->basedomain, $this->domains);
|
202 |
+
} catch (Exception $e) {
|
203 |
+
$this->wple_log(
|
204 |
+
"CREATE_ORDER:" . $e,
|
205 |
+
'error',
|
206 |
+
'w',
|
207 |
+
true
|
208 |
+
);
|
209 |
+
}
|
210 |
+
}
|
211 |
+
|
212 |
+
/**
|
213 |
+
* Get all pendings orders which need domain verification
|
214 |
+
*
|
215 |
+
* @since 1.0.0
|
216 |
+
* @return void
|
217 |
+
*/
|
218 |
+
protected function wple_get_pendings($dns = false)
|
219 |
+
{
|
220 |
+
$chtype = LEOrder::CHALLENGE_TYPE_HTTP;
|
221 |
+
$http = 1;
|
222 |
+
|
223 |
+
if ($this->dnss || $dns) {
|
224 |
+
$chtype = LEOrder::CHALLENGE_TYPE_DNS;
|
225 |
+
$http = 0;
|
226 |
+
}
|
227 |
+
|
228 |
+
try {
|
229 |
+
$this->pendings = $this->order->getPendingAuthorizations($chtype);
|
230 |
+
|
231 |
+
if (!empty($this->pendings) && $http == 1) {
|
232 |
+
$opts = get_option('wple_opts');
|
233 |
+
$opts['challenge_files'] = array();
|
234 |
+
foreach ($this->pendings as $chlng) {
|
235 |
+
$opts['challenge_files'][] = array(
|
236 |
+
'file' => sanitize_text_field(trim($chlng['filename'])),
|
237 |
+
'value' => sanitize_text_field(trim($chlng['content'])),
|
238 |
+
);
|
239 |
+
}
|
240 |
+
update_option('wple_opts', $opts);
|
241 |
+
}
|
242 |
+
} catch (Exception $e) {
|
243 |
+
$this->wple_log(
|
244 |
+
'GET_PENDING_AUTHS:' . $e,
|
245 |
+
'error',
|
246 |
+
'w',
|
247 |
+
true
|
248 |
+
);
|
249 |
+
}
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* verify all the challenges via HTTP
|
254 |
+
*
|
255 |
+
* @since 1.0.0
|
256 |
+
* @return void
|
257 |
+
*/
|
258 |
+
protected function wple_verify_pending_orders($forcehttpverify = false, $forcednsverify = false, $is_cron = false)
|
259 |
+
{
|
260 |
+
$this->iscron = $is_cron;
|
261 |
+
// $this->order->deactivateOrderAuthorization($this->basedomain);
|
262 |
+
// $this->order->revokeCertificate();
|
263 |
+
// exit();
|
264 |
+
if (isset($_GET['wpleauto'])) {
|
265 |
+
|
266 |
+
if ($_GET['wpleauto'] == 'http') {
|
267 |
+
$forcehttpverify = true;
|
268 |
+
} else {
|
269 |
+
$forcednsverify = true;
|
270 |
+
}
|
271 |
+
}
|
272 |
+
|
273 |
+
if (!$this->order->allAuthorizationsValid()) {
|
274 |
+
//since 4.7
|
275 |
+
$this->wple_override_subdir_logic();
|
276 |
+
|
277 |
+
if ($this->wcard) { } else {
|
278 |
+
$this->wple_single_ssl_verify($forcehttpverify, $forcednsverify);
|
279 |
+
}
|
280 |
+
}
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* Finalize and get certificates
|
285 |
+
*
|
286 |
+
* @since 1.0.0
|
287 |
+
* @return void
|
288 |
+
*/
|
289 |
+
public function wple_generate_certs($rectify = true)
|
290 |
+
{
|
291 |
+
|
292 |
+
if ($this->order->allAuthorizationsValid()) {
|
293 |
+
// Finalize the order
|
294 |
+
|
295 |
+
if (!$this->order->isFinalized()) {
|
296 |
+
$this->wple_log(esc_html__('Finalizing the order', 'wp-letsencrypt-ssl'), 'success', 'a');
|
297 |
+
$this->order->finalizeOrder();
|
298 |
+
}
|
299 |
+
|
300 |
+
// get the certificate.
|
301 |
+
|
302 |
+
if ($this->order->isFinalized()) {
|
303 |
+
$this->wple_log(esc_html__('Getting SSL certificates', 'wp-letsencrypt-ssl'), 'success', 'a');
|
304 |
+
$this->order->getCertificate();
|
305 |
+
}
|
306 |
+
|
307 |
+
//since 5.3.5
|
308 |
+
$this->wple_email_cert_files();
|
309 |
+
$cert = ABSPATH . 'keys/certificate.crt';
|
310 |
+
|
311 |
+
if (file_exists($cert)) {
|
312 |
+
$this->wple_save_expiry_date();
|
313 |
+
$sslgenerated = "<h2>" . esc_html__('SSL Certificate generated successfully', 'wp-letsencrypt-ssl') . "!</h2>";
|
314 |
+
|
315 |
+
//Temporary cross check CA Bundle
|
316 |
+
$cabundlefile = ABSPATH . 'keys/cabundle.crt';
|
317 |
+
if (file_exists($cabundlefile)) {
|
318 |
+
$sslgenerated .= "<br><br><strong>CA Bundle:</strong><br>";
|
319 |
+
$sslgenerated .= esc_html(file_get_contents($cabundlefile));
|
320 |
+
}
|
321 |
+
|
322 |
+
$this->wple_log($sslgenerated, 'success', 'a');
|
323 |
+
if (FALSE != ($dlog = get_option('wple_send_usage')) && $dlog) {
|
324 |
+
$this->wple_send_usage_data();
|
325 |
+
}
|
326 |
+
wp_redirect(admin_url('/admin.php?page=wp_encryption&success=1'), 302);
|
327 |
+
exit;
|
328 |
+
}
|
329 |
+
} else {
|
330 |
+
update_option('wple_error', 2);
|
331 |
+
$this->wple_log(
|
332 |
+
'<h2>' . esc_html__('There are some pending verifications. If new DNS records were added, please run this installation again after 5-10mins', 'wp-letsencrypt-ssl') . '</h2>',
|
333 |
+
'success',
|
334 |
+
'a',
|
335 |
+
false
|
336 |
+
);
|
337 |
+
$this->wple_http_not_possible();
|
338 |
+
$this->wple_log(
|
339 |
+
'',
|
340 |
+
'success',
|
341 |
+
'a',
|
342 |
+
true
|
343 |
+
);
|
344 |
+
}
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* Save expiry date of cert dynamically by parsing the cert
|
349 |
+
*
|
350 |
+
* @since 1.0.0
|
351 |
+
* @return void
|
352 |
+
*/
|
353 |
+
public function wple_save_expiry_date()
|
354 |
+
{
|
355 |
+
$certfile = ABSPATH . 'keys/certificate.crt';
|
356 |
+
|
357 |
+
if (file_exists($certfile)) {
|
358 |
+
$opts = get_option('wple_opts');
|
359 |
+
$opts['expiry'] = '';
|
360 |
+
try {
|
361 |
+
$this->wple_getRemainingDays($certfile, $opts);
|
362 |
+
} catch (Exception $e) {
|
363 |
+
update_option('wple_opts', $opts);
|
364 |
+
//echo $e;
|
365 |
+
//exit();
|
366 |
+
}
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* Utility functions
|
372 |
+
*
|
373 |
+
* @since 1.0.0
|
374 |
+
*/
|
375 |
+
public function wple_parseCertificate($cert_pem)
|
376 |
+
{
|
377 |
+
// if (false === ($ret = openssl_x509_read(file_get_contents($cert_pem)))) {
|
378 |
+
// throw new Exception('Could not load certificate: ' . $cert_pem . ' (' . $this->get_openssl_error() . ')');
|
379 |
+
// }
|
380 |
+
if (!is_array($ret = openssl_x509_parse(file_get_contents($cert_pem), true))) {
|
381 |
+
throw new Exception('Could not parse certificate');
|
382 |
+
}
|
383 |
+
return $ret;
|
384 |
+
}
|
385 |
+
|
386 |
+
public function wple_getRemainingDays($cert_pem, $opts)
|
387 |
+
{
|
388 |
+
$ret = $this->wple_parseCertificate($cert_pem);
|
389 |
+
$expiry = date('d-m-Y', $ret['validTo_time_t']);
|
390 |
+
$opts['expiry'] = $expiry;
|
391 |
+
if (isset($opts['expiry'])) {
|
392 |
+
wp_clear_scheduled_hook('wple_ssl_reminder_notice');
|
393 |
+
}
|
394 |
+
if ($opts['expiry'] != '') {
|
395 |
+
wp_schedule_single_event(strtotime('-10 day', strtotime($opts['expiry'])), 'wple_ssl_reminder_notice');
|
396 |
+
}
|
397 |
+
update_option('wple_opts', $opts);
|
398 |
+
update_option('wple_show_review', 1);
|
399 |
+
do_action('cert_expiry_updated');
|
400 |
+
}
|
401 |
+
|
402 |
+
public function wple_log(
|
403 |
+
$msg = '',
|
404 |
+
$type = 'success',
|
405 |
+
$mode = 'a',
|
406 |
+
$redirect = false
|
407 |
+
) {
|
408 |
+
$handle = fopen(WPLE_DEBUGGER . 'debug.log', $mode);
|
409 |
+
if ($type == 'error') {
|
410 |
+
$msg = '<span class="error"><b>' . esc_html__('ERROR', 'wp-letsencrypt-ssl') . ':</b> ' . wp_kses_post($msg) . '</span>';
|
411 |
+
}
|
412 |
+
fwrite($handle, wp_kses_post($msg) . "\n");
|
413 |
+
fclose($handle);
|
414 |
+
|
415 |
+
if ($redirect) {
|
416 |
+
if (FALSE != ($dlog = get_option('wple_send_usage')) && $dlog) {
|
417 |
+
$this->wple_send_usage_data();
|
418 |
+
}
|
419 |
+
wp_redirect(admin_url('/admin.php?page=wp_encryption&error=1'), 302);
|
420 |
+
die;
|
421 |
+
}
|
422 |
+
}
|
423 |
+
|
424 |
+
/**
|
425 |
+
* Collect usage data to improve plugin
|
426 |
+
*
|
427 |
+
* @since 2.1.0
|
428 |
+
* @return void
|
429 |
+
*/
|
430 |
+
public function wple_send_usage_data()
|
431 |
+
{
|
432 |
+
$readlog = file_get_contents(WPLE_DEBUGGER . 'debug.log');
|
433 |
+
$handle = curl_init();
|
434 |
+
$srvr = array(
|
435 |
+
'challenge_folder_exists' => file_exists(ABSPATH . '.well-known/acme-challenge'),
|
436 |
+
'certificate_exists' => file_exists(ABSPATH . 'keys/certificate.crt'),
|
437 |
+
'server_software' => $_SERVER['SERVER_SOFTWARE'],
|
438 |
+
'http_host' => $_SERVER['HTTP_HOST'],
|
439 |
+
'pro' => (wple_fs()->is__premium_only() ? 'PRO' : 'FREE'),
|
440 |
+
);
|
441 |
+
$curlopts = array(
|
442 |
+
CURLOPT_RETURNTRANSFER => 1,
|
443 |
+
CURLOPT_POST => 1,
|
444 |
+
CURLOPT_URL => 'https://gowebsmarty.in/?catchwple=1',
|
445 |
+
CURLOPT_HEADER => false,
|
446 |
+
CURLOPT_POSTFIELDS => array(
|
447 |
+
'response' => $readlog,
|
448 |
+
'server' => json_encode($srvr),
|
449 |
+
),
|
450 |
+
CURLOPT_TIMEOUT => 30,
|
451 |
+
);
|
452 |
+
curl_setopt_array($handle, $curlopts);
|
453 |
+
try {
|
454 |
+
curl_exec($handle);
|
455 |
+
} catch (Exception $e) {
|
456 |
+
curl_close($handle);
|
457 |
+
return;
|
458 |
+
}
|
459 |
+
curl_close($handle);
|
460 |
+
}
|
461 |
+
|
462 |
+
/**
|
463 |
+
* Show DNS records for domain verification
|
464 |
+
*
|
465 |
+
* @since 2.2.0
|
466 |
+
* @return void
|
467 |
+
*/
|
468 |
+
private function reloop_get_dns($return = false)
|
469 |
+
{
|
470 |
+
$site = str_ireplace('www.', '', $this->basedomain);
|
471 |
+
$vrfy = '';
|
472 |
+
$this->wple_get_pendings(true);
|
473 |
+
$dns_records = array();
|
474 |
+
foreach ($this->pendings as $challenge) {
|
475 |
+
|
476 |
+
if ($challenge['type'] == 'dns-01' && stripos($challenge['identifier'], $site) !== FALSE) {
|
477 |
+
$vrfy .= 'Name: <b>_acme-challenge.' . $site . '</b> or <b>_acme-challenge</b>
|
478 |
+
TTL: <b>60</b> or <b>Lowest</b> possible value
|
479 |
+
Type: <b>TXT</b>
|
480 |
+
Value: <b>' . esc_html($challenge['DNSDigest']) . '</b><br>
|
481 |
+
';
|
482 |
+
$dns_records[] = esc_html($challenge['DNSDigest']);
|
483 |
+
}
|
484 |
+
}
|
485 |
+
if ($return) {
|
486 |
+
return $dns_records;
|
487 |
+
}
|
488 |
+
$this->wple_log($vrfy, 'success', 'a');
|
489 |
+
}
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Deploy challenge files
|
493 |
+
*
|
494 |
+
* @since 3.2.0
|
495 |
+
* @param array $challenge
|
496 |
+
* @return void
|
497 |
+
*/
|
498 |
+
private function wple_deploy_challenge_files($acmefile, $challenge)
|
499 |
+
{
|
500 |
+
$fpath = ABSPATH . '.well-known/acme-challenge/';
|
501 |
+
if (!file_exists($fpath)) {
|
502 |
+
mkdir($fpath, 0775, true);
|
503 |
+
}
|
504 |
+
$this->wple_log(esc_html__('Creating HTTP challenge file', 'wp-letsencrypt-ssl') . ' ' . $acmefile, 'success', 'a');
|
505 |
+
file_put_contents($fpath . $challenge['filename'], trim($challenge['content']));
|
506 |
+
}
|
507 |
+
|
508 |
+
/**
|
509 |
+
* Retrieve file content
|
510 |
+
*
|
511 |
+
* @since 3.2.0
|
512 |
+
* @param string $acmefile
|
513 |
+
* @return void
|
514 |
+
*/
|
515 |
+
private function wple_get_file_response($acmefile)
|
516 |
+
{
|
517 |
+
$args = array(
|
518 |
+
'sslverify' => false,
|
519 |
+
);
|
520 |
+
$remoteget = wp_remote_get($acmefile, $args);
|
521 |
+
|
522 |
+
if (is_wp_error($remoteget)) {
|
523 |
+
$rsponse = 'error';
|
524 |
+
} else {
|
525 |
+
$rsponse = trim(wp_remote_retrieve_body($remoteget));
|
526 |
+
}
|
527 |
+
|
528 |
+
return $rsponse;
|
529 |
+
}
|
530 |
+
|
531 |
+
/**
|
532 |
+
* Save HTTP + DNS challenges for later use
|
533 |
+
*
|
534 |
+
* @since 4.6.0
|
535 |
+
* @return void
|
536 |
+
*/
|
537 |
+
private function wple_save_all_challenges($dnsonly = false)
|
538 |
+
{
|
539 |
+
$opts = (FALSE === get_option('wple_opts') ? array() : get_option('wple_opts'));
|
540 |
+
//DNS
|
541 |
+
$chtype = LEOrder::CHALLENGE_TYPE_DNS;
|
542 |
+
try {
|
543 |
+
$dns_challenges = $this->order->getPendingAuthorizations($chtype);
|
544 |
+
|
545 |
+
if (!empty($dns_challenges)) {
|
546 |
+
$opts['dns_challenges'] = array();
|
547 |
+
foreach ($dns_challenges as $challenge) {
|
548 |
+
|
549 |
+
if ($challenge['type'] == 'dns-01' && stripos($challenge['identifier'], $this->rootdomain) !== FALSE) {
|
550 |
+
$identifier = $challenge['identifier'];
|
551 |
+
$opts['dns_challenges'][] = sanitize_text_field($identifier) . '||' . sanitize_text_field($challenge['DNSDigest']);
|
552 |
+
}
|
553 |
+
}
|
554 |
+
}
|
555 |
+
} catch (Exception $e) {
|
556 |
+
$this->wple_log(
|
557 |
+
'Unable to store DNS challenges:' . $e,
|
558 |
+
'error',
|
559 |
+
'w',
|
560 |
+
true
|
561 |
+
);
|
562 |
+
}
|
563 |
+
|
564 |
+
if ($opts['type'] != 'wildcard') {
|
565 |
+
//HTTP
|
566 |
+
$chtype = LEOrder::CHALLENGE_TYPE_HTTP;
|
567 |
+
try {
|
568 |
+
$httppendings = $this->order->getPendingAuthorizations($chtype);
|
569 |
+
|
570 |
+
if (!empty($httppendings)) {
|
571 |
+
$opts['challenge_files'] = array();
|
572 |
+
foreach ($httppendings as $chlng) {
|
573 |
+
$opts['challenge_files'][] = array(
|
574 |
+
'file' => sanitize_text_field(trim($chlng['filename'])),
|
575 |
+
'value' => sanitize_text_field(trim($chlng['content'])),
|
576 |
+
);
|
577 |
+
}
|
578 |
+
}
|
579 |
+
} catch (Exception $e) {
|
580 |
+
$this->wple_log(
|
581 |
+
'Unable to store HTTP challenges:' . $e,
|
582 |
+
'error',
|
583 |
+
'w',
|
584 |
+
true
|
585 |
+
);
|
586 |
+
}
|
587 |
+
}
|
588 |
+
|
589 |
+
update_option('wple_opts', $opts);
|
590 |
+
}
|
591 |
+
|
592 |
+
/**
|
593 |
+
* Detect sub-dir site & act accordingly
|
594 |
+
* Manual verification for subdir site
|
595 |
+
*
|
596 |
+
* @since 4.7.0
|
597 |
+
* @return void
|
598 |
+
*/
|
599 |
+
private function wple_override_subdir_logic()
|
600 |
+
{
|
601 |
+
$opts = get_option('wple_opts');
|
602 |
+
|
603 |
+
if (isset($opts['subdir']) && !isset($_GET['wpleauto'])) {
|
604 |
+
update_option('wple_error', 2);
|
605 |
+
$this->wple_log('Cleaning & re-generating challenges', 'success', 'a');
|
606 |
+
if (isset($opts['challenge_files'])) {
|
607 |
+
unset($opts['challenge_files']);
|
608 |
+
}
|
609 |
+
if (isset($opts['dns_challenges'])) {
|
610 |
+
unset($opts['dns_challenges']);
|
611 |
+
}
|
612 |
+
$this->wple_save_all_challenges();
|
613 |
+
wp_redirect(admin_url('/admin.php?page=wp_encryption&subdir=1'), 302);
|
614 |
+
exit;
|
615 |
+
}
|
616 |
+
}
|
617 |
+
|
618 |
+
/**
|
619 |
+
* DNS only verification for http noscript
|
620 |
+
*
|
621 |
+
* @since 5.0.7
|
622 |
+
* @return void
|
623 |
+
*/
|
624 |
+
public function wple_http_not_possible()
|
625 |
+
{
|
626 |
+
|
627 |
+
if (FALSE != ($httpvalid = get_option('wple_http_valid')) && $httpvalid) {
|
628 |
+
$this->wple_save_all_challenges();
|
629 |
+
wp_redirect(admin_url('/admin.php?page=wp_encryption&subdir=1'), 302);
|
630 |
+
exit;
|
631 |
+
}
|
632 |
+
}
|
633 |
+
|
634 |
+
protected function wple_single_ssl_verify($forcehttpverify, $forcednsverify)
|
635 |
+
{
|
636 |
+
|
637 |
+
if ($forcednsverify) {
|
638 |
+
//dns verify
|
639 |
+
$this->wple_get_pendings(true);
|
640 |
+
} else {
|
641 |
+
$this->wple_get_pendings();
|
642 |
+
}
|
643 |
+
|
644 |
+
if (!empty($this->pendings)) {
|
645 |
+
foreach ($this->pendings as $challenge) {
|
646 |
+
|
647 |
+
if ($challenge['type'] == 'dns-01' && stripos($challenge['identifier'], $this->rootdomain) !== FALSE) {
|
648 |
+
$lcheck = false;
|
649 |
+
$this->order->verifyPendingOrderAuthorization($challenge['identifier'], LEOrder::CHALLENGE_TYPE_DNS, $lcheck);
|
650 |
+
} else {
|
651 |
+
|
652 |
+
if ($challenge['type'] == 'http-01' && stripos($challenge['identifier'], $this->rootdomain) !== FALSE) {
|
653 |
+
///if (!$this->dnss && !$forcednsverify) {
|
654 |
+
$acmefile = "http://" . $challenge['identifier'] . "/.well-known/acme-challenge/" . $challenge['filename'];
|
655 |
+
$rsponse = $this->wple_get_file_response($acmefile);
|
656 |
+
|
657 |
+
if ($rsponse != trim($challenge['content']) && !isset($_GET['wpleauto'])) {
|
658 |
+
update_option('wple_error', 2);
|
659 |
+
$this->wple_log(esc_html__("Offering manual verification procedure.", 'wp-letsencrypt-ssl') . " \n", 'success', 'a');
|
660 |
+
if (FALSE != ($dlog = get_option('wple_send_usage')) && $dlog) {
|
661 |
+
$this->wple_send_usage_data();
|
662 |
+
}
|
663 |
+
$this->wple_save_all_challenges();
|
664 |
+
wp_redirect(admin_url('/admin.php?page=wp_encryption&subdir=1'), 302);
|
665 |
+
exit;
|
666 |
+
}
|
667 |
+
|
668 |
+
$lcheck = false;
|
669 |
+
$this->order->verifyPendingOrderAuthorization($challenge['identifier'], LEOrder::CHALLENGE_TYPE_HTTP, $lcheck);
|
670 |
+
///}
|
671 |
+
}
|
672 |
+
}
|
673 |
+
}
|
674 |
+
}
|
675 |
+
}
|
676 |
+
|
677 |
+
protected function wple_goto_manual_challenges()
|
678 |
+
{
|
679 |
+
$this->wple_save_all_challenges();
|
680 |
+
wp_redirect(admin_url('/admin.php?page=wp_encryption&subdir=1'), 302);
|
681 |
+
exit;
|
682 |
+
}
|
683 |
+
|
684 |
+
/**
|
685 |
+
* simple debug log message
|
686 |
+
*
|
687 |
+
* @since 5.2.6
|
688 |
+
* @return void
|
689 |
+
*/
|
690 |
+
private function wple_nocpanel_notice($renewal = false)
|
691 |
+
{
|
692 |
+
|
693 |
+
if ($renewal == false) {
|
694 |
+
WPLE_Trait::wple_logger("Awaiting SSL installation for Non-cPanel site and SSL validation\n", "success");
|
695 |
+
wp_redirect(admin_url('/admin.php?page=wp_encryption&nocpanel=1'), 302);
|
696 |
+
exit;
|
697 |
+
}
|
698 |
+
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Email SSL certs as attachment
|
702 |
+
*
|
703 |
+
* @since 5.3.5
|
704 |
+
* @return void
|
705 |
+
*/
|
706 |
+
private function wple_email_cert_files()
|
707 |
+
{
|
708 |
+
|
709 |
+
if (class_exists('ZipArchive')) {
|
710 |
+
$opts = get_option('wple_opts');
|
711 |
+
|
712 |
+
if (get_option('wple_email_certs') == true) {
|
713 |
+
$zip = new ZipArchive();
|
714 |
+
$zip->open(ABSPATH . 'keys/certificates.zip', ZipArchive::CREATE);
|
715 |
+
$certificate = ABSPATH . 'keys/certificate.crt';
|
716 |
+
$zip->addFile($certificate, 'certificate.crt');
|
717 |
+
$ret = $this->wple_parseCertificate($certificate);
|
718 |
+
$certexpirydate = date('d-m-Y', $ret['validTo_time_t']);
|
719 |
+
$pemfile = ABSPATH . 'keys/private.pem';
|
720 |
+
$zip->addFile($pemfile, 'private.pem');
|
721 |
+
$cabundle = WPLE_DIR . 'cabundle/ca.crt';
|
722 |
+
if (file_exists(ABSPATH . 'keys/cabundle.crt')) {
|
723 |
+
$cabundle = ABSPATH . 'keys/cabundle.crt';
|
724 |
+
}
|
725 |
+
$zip->addFile($cabundle, 'cabundle.crt');
|
726 |
+
$zip->close();
|
727 |
+
$to = sanitize_email($opts['email']);
|
728 |
+
$subject = esc_html__('WP Encryption - Please find new SSL certs attached', 'wp-letsencrypt-ssl');
|
729 |
+
$headers = array('Content-Type: text/html; charset=UTF-8');
|
730 |
+
$body = '<h2>' . esc_html__('Your SSL certs have been generated / auto renewed today!', 'wp-letsencrypt-ssl') . '</h2>';
|
731 |
+
$body .= '<p>' . esc_html__('New SSL cert files have been attached to this email as per your preferences.', 'wp-letsencrypt-ssl') . ' ' . esc_html__('These certificates expires on', 'wp-letsencrypt-ssl') . ' <b>' . esc_html($certexpirydate) . '</b></p>';
|
732 |
+
wp_mail(
|
733 |
+
$to,
|
734 |
+
$subject,
|
735 |
+
$body,
|
736 |
+
$headers,
|
737 |
+
array(ABSPATH . 'keys/certificates.zip')
|
738 |
+
);
|
739 |
+
unlink(ABSPATH . 'keys/certificates.zip');
|
740 |
+
}
|
741 |
+
}
|
742 |
+
}
|
743 |
+
}
|
classes/le-deactivator.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 1.0.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
class WPLE_Deactivator
|
28 |
+
{
|
29 |
+
public static function deactivate()
|
30 |
+
{
|
31 |
+
$opts = ( get_option( 'wple_opts' ) === FALSE ? array(
|
32 |
+
'expiry' => '',
|
33 |
+
) : get_option( 'wple_opts' ) );
|
34 |
+
//disable ssl forcing
|
35 |
+
$opts['force_ssl'] = 0;
|
36 |
+
update_option( 'wple_opts', $opts );
|
37 |
+
// retained - wple_show_reminder, wple_send_usage
|
38 |
+
$opts_to_delete = array(
|
39 |
+
'wple_show_review',
|
40 |
+
'wple_have_cpanel',
|
41 |
+
'wple_plan_choose',
|
42 |
+
'wple_no_pricing',
|
43 |
+
'wple_mx',
|
44 |
+
'wple_http_valid'
|
45 |
+
);
|
46 |
+
foreach ( $opts_to_delete as $optname ) {
|
47 |
+
delete_option( $optname );
|
48 |
+
}
|
49 |
+
//clear reminder cron
|
50 |
+
if ( wp_next_scheduled( 'wple_ssl_reminder_notice' ) ) {
|
51 |
+
wp_clear_scheduled_hook( 'wple_ssl_reminder_notice' );
|
52 |
+
}
|
53 |
+
//remove debug log
|
54 |
+
if ( file_exists( WPLE_DEBUGGER . 'debug.log' ) ) {
|
55 |
+
@unlink( WPLE_DEBUGGER . 'debug.log' );
|
56 |
+
}
|
57 |
+
//clean force https rules in htaccess
|
58 |
+
|
59 |
+
if ( is_writable( ABSPATH . '.htaccess' ) ) {
|
60 |
+
$htaccess = file_get_contents( ABSPATH . '.htaccess' );
|
61 |
+
$group = "/#\\s?BEGIN\\s?WP_Encryption_Force_SSL.*?#\\s?END\\s?WP_Encryption_Force_SSL/s";
|
62 |
+
|
63 |
+
if ( preg_match( $group, $htaccess ) ) {
|
64 |
+
$modhtaccess = preg_replace( $group, "", $htaccess );
|
65 |
+
//insert_with_markers(ABSPATH . '.htaccess', '', $modhtaccess);
|
66 |
+
file_put_contents( ABSPATH . '.htaccess', $modhtaccess );
|
67 |
+
}
|
68 |
+
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
classes/le-forcessl.php
ADDED
@@ -0,0 +1,200 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 1.1.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
|
28 |
+
/**
|
29 |
+
* WPLE_ForceSSL
|
30 |
+
*
|
31 |
+
* Forces all resources to https on frontend
|
32 |
+
* @since 1.1.0
|
33 |
+
*/
|
34 |
+
class WPLE_ForceSSL
|
35 |
+
{
|
36 |
+
|
37 |
+
public function __construct()
|
38 |
+
{
|
39 |
+
if (defined('WPLE_DISABLE_HTTPS')) {
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
|
43 |
+
$spmode_activated = get_option('wple_spmode_activated');
|
44 |
+
|
45 |
+
$opts = get_option('wple_opts');
|
46 |
+
$opts = (FALSE === $opts) ? array() : $opts;
|
47 |
+
|
48 |
+
add_action('wp', array($this, 'wple_revert_force_https'));
|
49 |
+
|
50 |
+
if (!is_admin() && FALSE === $spmode_activated) {
|
51 |
+
|
52 |
+
if (FALSE !== get_option('wple_upgrade_insecure')) {
|
53 |
+
add_action("wp_head", array($this, 'wple_upgrade_req'));
|
54 |
+
}
|
55 |
+
|
56 |
+
if (FALSE !== get_option("wple_hsts")) {
|
57 |
+
add_action('send_headers', [$this, 'wple_hsts_header']);
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
if (isset($opts['force_ssl']) && $opts['force_ssl'] == 1 && FALSE === $spmode_activated) {
|
62 |
+
|
63 |
+
if (!is_admin()) {
|
64 |
+
add_action('wp_loaded', array($this, 'wple_force_ssl'), 20);
|
65 |
+
}
|
66 |
+
|
67 |
+
add_action("init", array($this, 'wple_start_buff'));
|
68 |
+
add_action("shutdown", array($this, 'wple_end_buff'), 999);
|
69 |
+
} else if (!is_admin() && FALSE !== get_option('wple_mixed_content_fixer')) { //frontend only
|
70 |
+
|
71 |
+
add_action("init", array($this, 'wple_start_buff'));
|
72 |
+
add_action("shutdown", array($this, 'wple_end_buff'), 999);
|
73 |
+
}
|
74 |
+
}
|
75 |
+
|
76 |
+
public function wple_force_ssl()
|
77 |
+
{
|
78 |
+
$this->wple_revert_force_https();
|
79 |
+
add_action('wp', array($this, 'wple_ssl_redirect'), 40, 3);
|
80 |
+
add_action('wp_print_scripts', array($this, 'wple_forcessl_js'));
|
81 |
+
}
|
82 |
+
|
83 |
+
public function wple_forcessl_js()
|
84 |
+
{
|
85 |
+
$script = '<script>';
|
86 |
+
$script .= 'if (document.location.protocol != "https:") {';
|
87 |
+
$script .= 'document.location = document.URL.replace(/^http:/i, "https:");';
|
88 |
+
$script .= '}';
|
89 |
+
$script .= '</script>';
|
90 |
+
|
91 |
+
echo $script;
|
92 |
+
}
|
93 |
+
|
94 |
+
public function wple_ssl_redirect()
|
95 |
+
{
|
96 |
+
if (!is_ssl()) {
|
97 |
+
$redirect_url = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
98 |
+
wp_redirect($redirect_url, 301);
|
99 |
+
exit;
|
100 |
+
}
|
101 |
+
}
|
102 |
+
|
103 |
+
public function wple_start_buff()
|
104 |
+
{
|
105 |
+
ob_start(array($this, 'wple_buffer_https'));
|
106 |
+
}
|
107 |
+
|
108 |
+
public function wple_end_buff()
|
109 |
+
{
|
110 |
+
if (ob_get_length()) ob_end_flush();
|
111 |
+
}
|
112 |
+
|
113 |
+
public function wple_buffer_https($buffer)
|
114 |
+
{
|
115 |
+
if (substr($buffer, 0, 5) == "<?xml") return $buffer;
|
116 |
+
|
117 |
+
$home = str_replace("https://", "http://", get_option('home'));
|
118 |
+
|
119 |
+
$eschome = str_replace("/", "\/", $home);
|
120 |
+
|
121 |
+
$src = array(
|
122 |
+
$eschome,
|
123 |
+
"src='http://",
|
124 |
+
'src="http://',
|
125 |
+
);
|
126 |
+
|
127 |
+
$ssl_array = str_replace(array("http://", "http:\/\/"), array("https://", "https:\/\/"), $src);
|
128 |
+
|
129 |
+
$buffer = str_replace($src, $ssl_array, $buffer);
|
130 |
+
|
131 |
+
$pattern = array(
|
132 |
+
'/url\([\'"]?\K(http:\/\/)(?=[^)]+)/i',
|
133 |
+
'/<link [^>]*?href=[\'"]\K(http:\/\/)(?=[^\'"]+)/i',
|
134 |
+
'/<meta property="og:image" [^>]*?content=[\'"]\K(http:\/\/)(?=[^\'"]+)/i',
|
135 |
+
'/<form [^>]*?action=[\'"]\K(http:\/\/)(?=[^\'"]+)/i',
|
136 |
+
);
|
137 |
+
|
138 |
+
$buffer = preg_replace($pattern, 'https://', $buffer);
|
139 |
+
|
140 |
+
$buffer = preg_replace_callback('/<img[^\>]*[^\>\S]+srcset=[\'"]\K((?:[^"\'\s,]+\s*(?:\s+\d+[wx])(?:,\s*)?)+)["\']/', array($this, 'wple_replace_srcset'), $buffer);
|
141 |
+
|
142 |
+
return $buffer;
|
143 |
+
}
|
144 |
+
|
145 |
+
public function wple_replace_srcset($matches)
|
146 |
+
{
|
147 |
+
return str_replace("http://", "https://", $matches[0]);
|
148 |
+
}
|
149 |
+
|
150 |
+
public function wple_upgrade_req()
|
151 |
+
{
|
152 |
+
echo '<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">';
|
153 |
+
}
|
154 |
+
|
155 |
+
/**
|
156 |
+
* Revert to http using secret nonce
|
157 |
+
*
|
158 |
+
* @since 3.3.0
|
159 |
+
* @return void
|
160 |
+
*/
|
161 |
+
public function wple_revert_force_https()
|
162 |
+
{
|
163 |
+
$opts = get_option('wple_opts');
|
164 |
+
$revertnonce = isset($opts['revertnonce']) ? $opts['revertnonce'] : false;
|
165 |
+
if (isset($_GET['reverthttps']) && $revertnonce != FALSE && $_GET['reverthttps'] == $revertnonce) {
|
166 |
+
$opts['force_ssl'] = 0;
|
167 |
+
update_option('wple_opts', $opts);
|
168 |
+
|
169 |
+
global $wpdb;
|
170 |
+
$data = array(
|
171 |
+
'option_value' => esc_url_raw(str_ireplace('https:', 'http:', get_option('siteurl')))
|
172 |
+
);
|
173 |
+
$where = array(
|
174 |
+
'option_name' => 'siteurl'
|
175 |
+
);
|
176 |
+
$wpdb->update($wpdb->prefix . 'options', $data, $where);
|
177 |
+
|
178 |
+
$data = array(
|
179 |
+
'option_value' => esc_url_raw(str_ireplace('https:', 'http:', get_option('home')))
|
180 |
+
);
|
181 |
+
$where = array(
|
182 |
+
'option_name' => 'home'
|
183 |
+
);
|
184 |
+
$wpdb->update($wpdb->prefix . 'options', $data, $where);
|
185 |
+
|
186 |
+
exit(esc_html__('Reverted back to HTTP. Access your site now with http:// protocol.', 'wp-letsencrypt-ssl'));
|
187 |
+
}
|
188 |
+
}
|
189 |
+
|
190 |
+
/**
|
191 |
+
* HSTS Strict Transport Security
|
192 |
+
*
|
193 |
+
* @since 5.5.0
|
194 |
+
* @return void
|
195 |
+
*/
|
196 |
+
public function wple_hsts_header()
|
197 |
+
{
|
198 |
+
header("Strict-Transport-Security: max-age=31536000");
|
199 |
+
}
|
200 |
+
}
|
classes/le-scanner.php
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty. All Rights Reserved.
|
8 |
+
* @link https://gowebsmarty.com
|
9 |
+
* @since Class available since Release 5.1.7
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
require_once WPLE_DIR . 'classes/le-advanced-scanner.php';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* Mixed content scanner
|
16 |
+
*
|
17 |
+
* @since 5.1.7
|
18 |
+
*/
|
19 |
+
class WPLE_Scanner
|
20 |
+
{
|
21 |
+
|
22 |
+
public function __construct()
|
23 |
+
{
|
24 |
+
add_action('wp_ajax_wple_start_scanner', [$this, 'wple_cspro']);
|
25 |
+
}
|
26 |
+
|
27 |
+
public function wple_cspro()
|
28 |
+
{
|
29 |
+
|
30 |
+
if (!wp_verify_nonce($_POST['nc'], 'wplemixedscanner') || !current_user_can('manage_options')) {
|
31 |
+
http_response_code(403);
|
32 |
+
exit('Unauthorized');
|
33 |
+
}
|
34 |
+
|
35 |
+
$basedomain = esc_html(str_ireplace(array('http://', 'https://'), array('', ''), site_url()));
|
36 |
+
|
37 |
+
$client = WPLE_Trait::wple_verify_ssl($basedomain);
|
38 |
+
|
39 |
+
if (!$client) {
|
40 |
+
echo 'nossl';
|
41 |
+
exit();
|
42 |
+
}
|
43 |
+
|
44 |
+
// $matches = [];
|
45 |
+
// if (preg_match('/([\w\/]*)/i', $_POST['scanpath'], $matches)) {
|
46 |
+
// $scanurl = trailingslashit(site_url()) . $matches[0];
|
47 |
+
new WPLE_DeepScanner();
|
48 |
+
exit();
|
49 |
+
// } else {
|
50 |
+
// echo 'invalid';
|
51 |
+
// exit();
|
52 |
+
// }
|
53 |
+
}
|
54 |
+
}
|
classes/le-subdir-challenge.php
ADDED
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 4.7.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
require_once WPLE_DIR . 'classes/le-trait.php';
|
28 |
+
/**
|
29 |
+
* Sub-directory http challenge
|
30 |
+
*
|
31 |
+
* @since 4.7.0
|
32 |
+
*/
|
33 |
+
class WPLE_Subdir_Challenge_Helper
|
34 |
+
{
|
35 |
+
public static function show_challenges( $opts )
|
36 |
+
{
|
37 |
+
if ( !isset( $opts['challenge_files'] ) && !isset( $opts['dns_challenges'] ) ) {
|
38 |
+
return esc_html__( 'Could not retrieve domain verification challenges. Please go back and try again.', 'wp-letsencrypt-ssl' );
|
39 |
+
}
|
40 |
+
$output = '<h2 style="color:#777">' . WPLE_Trait::wple_kses( __( 'Please verify your domain ownership by completing <strong>one</strong> of the below challenges', 'wp-letsencrypt-ssl' ) ) . ':</h2>';
|
41 |
+
$output .= WPLE_Trait::wple_progress_bar();
|
42 |
+
$output .= '<div id="wple-letsdebug"></div>';
|
43 |
+
$output .= '<div class="subdir-challenges-block">
|
44 |
+
<div class="subdir-http-challenge manualchallenge">' . SELF::HTTP_challenges_block( $opts['challenge_files'], $opts ) . '</div>
|
45 |
+
<div class="subdir-dns-challenge manualchallenge">' . SELF::DNS_challenges_block( $opts['dns_challenges'] ) . '</div>
|
46 |
+
</div>
|
47 |
+
<div id="wple-error-popper">
|
48 |
+
<div class="wple-flex">
|
49 |
+
<img src="' . WPLE_URL . 'admin/assets/loader.png" class="wple-loader"/>
|
50 |
+
<div class="wple-error">Error</div>
|
51 |
+
</div>
|
52 |
+
</div>';
|
53 |
+
$havecPanel = ( FALSE !== get_option( 'wple_have_cpanel' ) ? get_option( 'wple_have_cpanel' ) : 0 );
|
54 |
+
// if (!wple_fs()->can_use_premium_code__premium_only() && FALSE == get_option('wple_no_pricing')) {
|
55 |
+
// if (!$havecPanel) {
|
56 |
+
// $output .= '<div class="wple-error-firewall">
|
57 |
+
// <div>
|
58 |
+
// <img src="' . WPLE_URL . 'admin/assets/firewall-shield-firewall.png"/>
|
59 |
+
// </div>
|
60 |
+
// <div class="wple-upgrade-features">
|
61 |
+
// <span><b>Instant</b><br>Firewall Setup</span>
|
62 |
+
// <span><b>Premium</b><br>Sectigo SSL</span>
|
63 |
+
// <span><b>Most Secure</b><br>Firewall</span>
|
64 |
+
// <span><b>Accelerate</b><br>Site with CDN</span>
|
65 |
+
// <a href="https://wpencryption.com/cdn-firewall/?utm_campaign=wpencryption&utm_source=wordpress&utm_medium=gocdn" target="_blank">Learn More <span class="dashicons dashicons-external"></span></a>
|
66 |
+
// </div>
|
67 |
+
// </div>';
|
68 |
+
// } else {
|
69 |
+
$upgradeurl = admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=lifetime&pricing_id=7965¤cy=usd' );
|
70 |
+
if ( !$havecPanel ) {
|
71 |
+
$upgradeurl = admin_url( '/admin.php?page=wp_encryption-pricing&checkout=true&plan_id=8210&plan_name=pro&billing_cycle=annual&pricing_id=7965¤cy=usd' );
|
72 |
+
}
|
73 |
+
$output .= '<div class="wple-error-firewall">
|
74 |
+
<div>
|
75 |
+
<img src="' . WPLE_URL . 'admin/assets/firewall-shield-pro.png"/>
|
76 |
+
</div>
|
77 |
+
<div class="wple-upgrade-features">
|
78 |
+
<span><b>Automatic</b><br>Domain Verification</span>
|
79 |
+
<span><b>Wildcard</b><br>SSL Support</span>
|
80 |
+
<span><b>Automatic</b><br>SSL Installation</span>
|
81 |
+
<span><b>Automatic</b><br>SSL Renewal</span>
|
82 |
+
<!--<span><b>Automatic</b><br>Content Delivery Network</span>
|
83 |
+
<span><b>Website</b><br>Security</span>-->
|
84 |
+
<a href="' . $upgradeurl . '">UPGRADE</a>
|
85 |
+
</div>
|
86 |
+
</div>';
|
87 |
+
// }
|
88 |
+
return $output;
|
89 |
+
}
|
90 |
+
|
91 |
+
public static function HTTP_challenges_block( $challenges, $opts )
|
92 |
+
{
|
93 |
+
if ( empty($challenges) ) {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
$list = '<h3>' . esc_html__( 'HTTP Challenges', 'wp-letsencrypt-ssl' ) . '</h3>
|
97 |
+
<span class="manual-verify-vid">
|
98 |
+
<a href="https://youtu.be/GVnEQU9XWG0" target="_blank" class="videolink"><span class="dashicons dashicons-video-alt"></span> ' . esc_html__( 'Video Tutorial', 'wp-letsencrypt-ssl' ) . '</a>
|
99 |
+
</span>
|
100 |
+
<p><b>Step 1:</b> ' . esc_html__( 'Download HTTP challenge files below', 'wp-letsencrypt-ssl' ) . '</p>';
|
101 |
+
$nc = wp_create_nonce( 'subdir_ch' );
|
102 |
+
$filesExpected = '';
|
103 |
+
$bareDomain = str_ireplace( array( 'https://', 'http://' ), array( '', '' ), site_url() );
|
104 |
+
if ( FALSE !== ($slashpos = stripos( $bareDomain, '/' )) ) {
|
105 |
+
$bareDomain = substr( $bareDomain, 0, $slashpos );
|
106 |
+
}
|
107 |
+
for ( $i = 0 ; $i < count( $challenges ) ; $i++ ) {
|
108 |
+
$j = $i + 1;
|
109 |
+
$list .= '<a href="?page=wp_encryption&subdir_chfile=' . $j . '&nc=' . $nc . '"><span class="dashicons dashicons-download"></span> ' . esc_html__( 'Download File', 'wp-letsencrypt-ssl' ) . ' ' . $j . '</a><br />';
|
110 |
+
$filesExpected .= '<div class="wple-http-manual-verify verify-' . esc_attr( $i ) . '"><a href="http://' . trailingslashit( esc_html( $bareDomain ) ) . '.well-known/acme-challenge/' . esc_html( $challenges[$i]['file'] ) . '" target="_blank">' . $j . '. ' . esc_html__( 'Verification File', 'wp-letsencrypt-ssl' ) . ' <span class="dashicons dashicons-external"></span></a></div>';
|
111 |
+
}
|
112 |
+
$list .= '
|
113 |
+
<p><b>Step 2:</b> ' . esc_html__( 'Open FTP or File Manager on your hosting panel', 'wp-letsencrypt-ssl' ) . '</p>
|
114 |
+
<p><b>Step 3:</b> ' . sprintf(
|
115 |
+
__( 'Navigate to your %sdomain%s / %ssub-domain%s folder. Create %s.well-known%s folder and create %sacme-challenge%s folder inside .well-known folder if not already created.', 'wp-letsencrypt-ssl' ),
|
116 |
+
'<b>',
|
117 |
+
'</b>',
|
118 |
+
'<b>',
|
119 |
+
'</b>',
|
120 |
+
'<b>',
|
121 |
+
'</b>',
|
122 |
+
'<b>',
|
123 |
+
'</b>'
|
124 |
+
) . '</p>
|
125 |
+
<p><b>Step 4:</b> ' . esc_html__( 'Upload the above downloaded challenge files into acme-challenge folder', 'wp-letsencrypt-ssl' ) . '</p>
|
126 |
+
|
127 |
+
<div class="wple-http-accessible">
|
128 |
+
<p>' . esc_html__( 'Uploaded files should be publicly viewable at', 'wp-letsencrypt-ssl' ) . ':</p>
|
129 |
+
' . $filesExpected . '
|
130 |
+
</div>
|
131 |
+
|
132 |
+
' . wp_nonce_field(
|
133 |
+
'verifyhttprecords',
|
134 |
+
'checkhttp',
|
135 |
+
false,
|
136 |
+
false
|
137 |
+
) . '
|
138 |
+
<button id="verify-subhttp" class="subdir_verify"><span class="dashicons dashicons-update stable"></span> ' . esc_html__( 'Verify HTTP Challenges', 'wp-letsencrypt-ssl' ) . '</button>
|
139 |
+
|
140 |
+
<div class="http-notvalid">' . esc_html__( 'Could not verify HTTP challenges. Please check whether HTTP challenge files uploaded to acme-challenge folder is publicly accessible.', 'wp-letsencrypt-ssl' ) . ' ' . esc_html__( 'Some hosts purposefully block BOT access to acme-challenge folder, please try DNS based verification.', 'wp-letsencrypt-ssl' );
|
141 |
+
if ( FALSE !== ($havecp = get_option( 'wple_have_cpanel' )) && $havecp && !wple_fs()->can_use_premium_code__premium_only() ) {
|
142 |
+
$list .= ' Upgrade to <b>PRO</b> version for fully automatic domain verification.';
|
143 |
+
}
|
144 |
+
$list .= '</div>';
|
145 |
+
if ( FALSE != ($httpvalid = get_option( 'wple_http_valid' )) && $httpvalid ) {
|
146 |
+
$list .= '<div class="wple-no-http">' . esc_html__( 'HTTP verification not possible on your site as your hosting server blocks bot access. Please proceed with DNS verification.', 'wp-letsencrypt-ssl' ) . '</div>';
|
147 |
+
}
|
148 |
+
if ( $opts['include_mail'] == 1 || $opts['include_webmail'] == 1 ) {
|
149 |
+
$list .= '<div class="wple-no-http">' . esc_html__( 'HTTP verification not possible when secure mail or webmail option is chosen. Please verify via DNS method.', 'wp-letsencrypt-ssl' ) . '</div>';
|
150 |
+
}
|
151 |
+
return $list;
|
152 |
+
}
|
153 |
+
|
154 |
+
public static function DNS_challenges_block( $challenges )
|
155 |
+
{
|
156 |
+
$list = '<h3>' . esc_html__( 'DNS Challenges', 'wp-letsencrypt-ssl' ) . '</h3>
|
157 |
+
<span class="manual-verify-vid">
|
158 |
+
<a href="https://youtu.be/BBQL69PDDrk" target="_blank" class="videolink"><span class="dashicons dashicons-video-alt"></span> ' . esc_html__( 'Video Tutorial', 'wp-letsencrypt-ssl' ) . '</a>
|
159 |
+
</span>
|
160 |
+
<p><b>Step 1:</b> ' . esc_html__( 'Go to domain DNS manager of your primary domain. Add below TXT records using add TXT record option.', 'wp-letsencrypt-ssl' ) . '</p>';
|
161 |
+
$dmn = str_ireplace( array( 'https://', 'http://', 'www.' ), '', site_url() );
|
162 |
+
for ( $i = 0 ; $i < count( $challenges ) ; $i++ ) {
|
163 |
+
|
164 |
+
if ( FALSE !== ($slashpos = stripos( $dmn, '/' )) ) {
|
165 |
+
$pdomain = substr( $dmn, 0, $slashpos );
|
166 |
+
} else {
|
167 |
+
$pdomain = $dmn;
|
168 |
+
}
|
169 |
+
|
170 |
+
$parts = explode( '.', $dmn );
|
171 |
+
$subdomain = '';
|
172 |
+
$domain_code = explode( '||', $challenges[$i] );
|
173 |
+
$acmedomain = str_ireplace( $pdomain, '', $domain_code[0] );
|
174 |
+
if ( count( $parts ) > 2 && strlen( $parts[0] ) >= 3 && strlen( $parts[1] ) > 3 ) {
|
175 |
+
$subdomain = $parts[0] . '.';
|
176 |
+
}
|
177 |
+
|
178 |
+
if ( count( $parts ) > 3 ) {
|
179 |
+
//double nested subdomain
|
180 |
+
$subdomain = '';
|
181 |
+
$acmedomain = $domain_code[0];
|
182 |
+
}
|
183 |
+
|
184 |
+
$acme = '_acme-challenge.' . esc_html( $acmedomain ) . $subdomain;
|
185 |
+
if ( count( $parts ) <= 3 ) {
|
186 |
+
$acme = substr( $acme, 0, -1 );
|
187 |
+
}
|
188 |
+
$list .= '<div class="subdns-item">
|
189 |
+
' . esc_html__( 'Name', 'wp-letsencrypt-ssl' ) . ': <b>' . $acme . '</b><br>
|
190 |
+
' . esc_html__( 'TTL', 'wp-letsencrypt-ssl' ) . ': <b>60</b> or ' . sprintf( __( '%sLowest%s possible value', 'wp-letsencrypt-ssl' ), '<b>', '</b>' ) . '<br>
|
191 |
+
' . esc_html__( 'Value', 'wp-letsencrypt-ssl' ) . ': <b>' . esc_html( $domain_code[1] ) . '</b>
|
192 |
+
</div>';
|
193 |
+
}
|
194 |
+
$list .= '
|
195 |
+
<p><b>Step 2:</b> ' . esc_html__( 'Please wait 5-10 Minutes for newly added DNS to propagate and then verify DNS using below button', 'wp-letsencrypt-ssl' ) . '.</p>
|
196 |
+
|
197 |
+
' . wp_nonce_field(
|
198 |
+
'verifydnsrecords',
|
199 |
+
'checkdns',
|
200 |
+
false,
|
201 |
+
false
|
202 |
+
) . '
|
203 |
+
<button id="verify-subdns" class="subdir_verify"><span class="dashicons dashicons-update stable"></span> ' . esc_html__( 'Verify DNS Challenges', 'wp-letsencrypt-ssl' ) . '</button>
|
204 |
+
|
205 |
+
<div class="dns-notvalid">' . esc_html__( 'Could not verify DNS records. Please check whether you have added above DNS records perfectly or try again after 5 minutes if you added DNS records just now.', 'wp-letsencrypt-ssl' );
|
206 |
+
if ( FALSE !== ($havecp = get_option( 'wple_have_cpanel' )) && $havecp && !wple_fs()->can_use_premium_code__premium_only() ) {
|
207 |
+
$list .= ' Upgrade to <b>PRO</b> version for fully automatic domain verification.';
|
208 |
+
}
|
209 |
+
$list .= '</div>';
|
210 |
+
return $list;
|
211 |
+
}
|
212 |
+
|
213 |
+
public static function download_challenge_files()
|
214 |
+
{
|
215 |
+
|
216 |
+
if ( isset( $_GET['subdir_chfile'] ) ) {
|
217 |
+
if ( !wp_verify_nonce( $_GET['nc'], 'subdir_ch' ) || !current_user_can( 'manage_options' ) ) {
|
218 |
+
die( 'Unauthorized request. Please try again.' );
|
219 |
+
}
|
220 |
+
$opts = get_option( 'wple_opts' );
|
221 |
+
|
222 |
+
if ( isset( $opts['challenge_files'] ) && !empty($opts['challenge_files']) ) {
|
223 |
+
$req = intval( $_GET['subdir_chfile'] ) - 1;
|
224 |
+
$ch = $opts['challenge_files'][$req];
|
225 |
+
if ( !isset( $ch ) ) {
|
226 |
+
wp_die( 'Requested challenge file not exists. Please go back and try again.' );
|
227 |
+
}
|
228 |
+
SELF::compose_challenge_files( $ch['file'], $ch['value'] );
|
229 |
+
} else {
|
230 |
+
wp_die( 'HTTP challenge files not ready. Please go back and try again.' );
|
231 |
+
}
|
232 |
+
|
233 |
+
}
|
234 |
+
|
235 |
+
}
|
236 |
+
|
237 |
+
private static function compose_challenge_files( $name, $content )
|
238 |
+
{
|
239 |
+
$file = sanitize_file_name( $name );
|
240 |
+
file_put_contents( $file, sanitize_text_field( $content ) );
|
241 |
+
header( 'Content-Description: File Transfer' );
|
242 |
+
header( 'Content-Type: text/plain; charset=UTF-8' );
|
243 |
+
header( 'Content-Length: ' . filesize( $file ) );
|
244 |
+
header( 'Content-Disposition: attachment; filename=' . basename( $file ) );
|
245 |
+
readfile( $file );
|
246 |
+
exit;
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* @package WP Encryption
|
5 |
+
*
|
6 |
+
* @author Go Web Smarty
|
7 |
+
* @copyright Copyright (C) 2019-2020, Go Web Smarty
|
8 |
+
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License, version 3
|
9 |
+
* @link https://gowebsmarty.com
|
10 |
+
* @since Class available since Release 5.1.0
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* This program is free software: you can redistribute it and/or modify
|
14 |
+
* it under the terms of the GNU General Public License as published by
|
15 |
+
* the Free Software Foundation, either version 3 of the License, or
|
16 |
+
* (at your option) any later version.
|
17 |
+
*
|
18 |
+
* This program is distributed in the hope that it will be useful,
|
19 |
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
* GNU General Public License for more details.
|
22 |
+
*
|
23 |
+
* You should have received a copy of the GNU General Public License
|
24 |
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
25 |
+
*
|
26 |
+
*/
|
27 |
+
class WPLE_Trait
|
28 |
+
{
|
29 |
+
/**
|
30 |
+
* Progress & error indicator
|
31 |
+
*
|
32 |
+
* @since 4.4.0
|
33 |
+
* @return void
|
34 |
+
*/
|
35 |
+
public static function wple_progress_bar( $yellow = 0 )
|
36 |
+
{
|
37 |
+
$stage1 = $stage2 = $stage3 = $stage4 = '';
|
38 |
+
$progress = get_option( 'wple_error' );
|
39 |
+
|
40 |
+
if ( FALSE === $progress ) {
|
41 |
+
//still waiting first run
|
42 |
+
} else {
|
43 |
+
|
44 |
+
if ( $progress == 0 ) {
|
45 |
+
//success
|
46 |
+
$stage1 = $stage2 = $stage3 = 'prog-1';
|
47 |
+
} else {
|
48 |
+
|
49 |
+
if ( $progress == 1 || $progress == 400 || $progress == 429 ) {
|
50 |
+
//failed on first step
|
51 |
+
$stage1 = 'prog-0';
|
52 |
+
} else {
|
53 |
+
|
54 |
+
if ( $progress == 2 ) {
|
55 |
+
$stage1 = 'prog-1';
|
56 |
+
$stage2 = 'prog-0';
|
57 |
+
} else {
|
58 |
+
|
59 |
+
if ( $progress == 3 ) {
|
60 |
+
$stage1 = $stage2 = 'prog-1';
|
61 |
+
$stage3 = 'prog-0';
|
62 |
+
} else {
|
63 |
+
|
64 |
+
if ( $progress == 4 ) {
|
65 |
+
$stage1 = $stage2 = $stage3 = 'prog-1';
|
66 |
+
$stage4 = 'prog-0';
|
67 |
+
} else {
|
68 |
+
if ( $progress == 5 ) {
|
69 |
+
$stage1 = $stage2 = $stage3 = 'prog-1';
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
}
|
74 |
+
|
75 |
+
}
|
76 |
+
|
77 |
+
}
|
78 |
+
|
79 |
+
}
|
80 |
+
|
81 |
+
}
|
82 |
+
|
83 |
+
if ( FALSE !== ($cmp = get_option( 'wple_complete' )) && $cmp ) {
|
84 |
+
$stage1 = $stage2 = $stage3 = $stage4 = 'prog-1';
|
85 |
+
}
|
86 |
+
$out = '<ul class="wple-progress">
|
87 |
+
<li class="' . $stage1 . '"><a href="?page=wp_encryption&restart=1" class="wple-tooltip" data-tippy="' . esc_attr__( "Click to re-start from beginning", 'wp-letsencrypt-ssl' ) . '"><span>1</span> ' . esc_html__( 'Registration', 'wp-letsencrypt-ssl' ) . '</a></li>
|
88 |
+
<li class="' . $stage2 . '"><span>2</span> ' . esc_html__( 'Domain Verification', 'wp-letsencrypt-ssl' ) . '</li>
|
89 |
+
<!--<li class="' . $stage3 . '"><span>3</span> ' . esc_html__( 'Certificate Generated', 'wp-letsencrypt-ssl' ) . '</li>-->
|
90 |
+
<li class="' . $stage4 . ' onprocess' . esc_attr( $yellow ) . '"><span>3</span> ' . esc_html__( 'Install SSL Certificate', 'wp-letsencrypt-ssl' ) . '</li>';
|
91 |
+
$out .= '</ul>';
|
92 |
+
return $out;
|
93 |
+
}
|
94 |
+
|
95 |
+
public static function wple_get_acmename( $nonwwwdomain, $identifier )
|
96 |
+
{
|
97 |
+
$dmn = $nonwwwdomain;
|
98 |
+
|
99 |
+
if ( FALSE !== ($slashpos = stripos( $dmn, '/' )) ) {
|
100 |
+
$pdomain = substr( $dmn, 0, $slashpos );
|
101 |
+
} else {
|
102 |
+
$pdomain = $dmn;
|
103 |
+
}
|
104 |
+
|
105 |
+
$parts = explode( '.', $dmn );
|
106 |
+
$subdomain = '';
|
107 |
+
$acmedomain = str_ireplace( $pdomain, '', $identifier );
|
108 |
+
|
109 |
+
if ( !in_array( 'uk', $parts ) ) {
|
110 |
+
//avoid confusing .co.uk domain as subdomain
|
111 |
+
if ( count( $parts ) > 2 && strlen( $parts[0] ) >= 3 ) {
|
112 |
+
$subdomain = $parts[0] . '.';
|
113 |
+
}
|
114 |
+
|
115 |
+
if ( count( $parts ) > 3 ) {
|
116 |
+
//double nested subdomain
|
117 |
+
$subdomain = '';
|
118 |
+
$acmedomain = $identifier;
|
119 |
+
}
|
120 |
+
|
121 |
+
}
|
122 |
+
|
123 |
+
$acme = '_acme-challenge.' . esc_html( $acmedomain ) . $subdomain;
|
124 |
+
if ( count( $parts ) <= 3 ) {
|
125 |
+
$acme = substr( $acme, 0, -1 );
|
126 |
+
}
|
127 |
+
return $acme;
|
128 |
+
}
|
129 |
+
|
130 |
+
public static function wple_Is_SubDomain( $syt )
|
131 |
+
{
|
132 |
+
$parts = explode( '.', $syt );
|
133 |
+
|
134 |
+
if ( count( $parts ) > 2 && strlen( $parts[0] ) >= 3 && strlen( $parts[1] ) > 2 ) {
|
135 |
+
return true;
|
136 |
+
//probably subdomain
|
137 |
+
}
|
138 |
+
|
139 |
+
return false;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* FAQ & Videos
|
144 |
+
*
|
145 |
+
* @param [type] $html
|
146 |
+
* @return void
|
147 |
+
* @since 5.2.2
|
148 |
+
*/
|
149 |
+
public static function wple_headernav( &$html )
|
150 |
+
{
|
151 |
+
if ( !wple_fs()->is_plan( 'firewall', true ) ) {
|
152 |
+
|
153 |
+
if ( FALSE == ($fstage = get_option( 'wple_firewall_stage' )) || $fstage != 6 ) {
|
154 |
+
$html .= '<div>
|
155 |
+
<ul id="wple-nav">
|
156 |
+
<li><a href="' . admin_url( '/admin.php?page=wp_encryption_log' ) . '"><span class="dashicons dashicons-admin-tools"></span> ' . esc_html__( 'Debug Log', 'wp-letsencrypt-ssl' ) . '</a></li>
|
157 |
+
<li><a href="' . admin_url( '/admin.php?page=wp_encryption_faq' ) . '"><span class="dashicons dashicons-editor-help"></span> ' . esc_html__( 'FAQ', 'wp-letsencrypt-ssl' ) . '</a></li>
|
158 |
+
<li><a href="' . admin_url( '/admin.php?page=wp_encryption_howto_videos' ) . '"><span class="dashicons dashicons-video-alt3"></span> ' . esc_html__( 'Videos', 'wp-letsencrypt-ssl' ) . '</a></li>';
|
159 |
+
$html .= '<li><a href="https://wordpress.org/support/plugin/wp-letsencrypt-ssl/" target="_blank" rel="nofollow"><span class="dashicons dashicons-sos"></span> ' . esc_html__( 'Free Support', 'wp-letsencrypt-ssl' ) . '</a></li>';
|
160 |
+
//if (!wple_fs()->is__premium_only()) {
|
161 |
+
//$html .= '<li><a href="https://wpencryption.com/cdn-firewall/" target="_blank"><span class="dashicons dashicons-superhero" style="font-size: 26px; width: 26px; line-height: 21px !important; margin-left: -5px;"></span> Speed Up Your Site <span class="dashicons dashicons-editor-help wple-tooltip bottom" data-tippy="Sky rocket your WordPress site performance with Fastest Content Delivery Network + Premium Sectigo SSL + Secure Firewall"></span></a></li>';
|
162 |
+
//}
|
163 |
+
$html .= '</ul></div>';
|
164 |
+
}
|
165 |
+
|
166 |
+
}
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Debug logger
|
171 |
+
*
|
172 |
+
* @param string $msg
|
173 |
+
* @param string $type
|
174 |
+
* @param string $mode
|
175 |
+
* @param boolean $redirect
|
176 |
+
* @return void
|
177 |
+
*
|
178 |
+
* @since 5.2.4
|
179 |
+
*/
|
180 |
+
public static function wple_logger(
|
181 |
+
$msg = '',
|
182 |
+
$type = 'success',
|
183 |
+
$mode = 'a',
|
184 |
+
$redirect = false
|
185 |
+
)
|
186 |
+
{
|
187 |
+
$handle = fopen( WPLE_DEBUGGER . 'debug.log', $mode );
|
188 |
+
if ( $type == 'error' ) {
|
189 |
+
$msg = '<span class="error"><b>' . esc_html__( 'ERROR', 'wp-letsencrypt-ssl' ) . ':</b> ' . wp_kses_post( $msg ) . '</span>';
|
190 |
+
}
|
191 |
+
fwrite( $handle, wp_kses_post( $msg ) . "\n" );
|
192 |
+
fclose( $handle );
|
193 |
+
|
194 |
+
if ( $redirect ) {
|
195 |
+
if ( FALSE != ($dlog = get_option( 'wple_send_usage' )) && $dlog ) {
|
196 |
+
SELF::wple_send_log_data();
|
197 |
+
}
|
198 |
+
wp_redirect( admin_url( '/admin.php?page=wp_encryption&error=1' ), 302 );
|
199 |
+
die;
|
200 |
+
}
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
public static function wple_send_log_data()
|
205 |
+
{
|
206 |
+
$readlog = file_get_contents( WPLE_DEBUGGER . 'debug.log' );
|
207 |
+
$handle = curl_init();
|
208 |
+
$srvr = array(
|
209 |
+
'challenge_folder_exists' => file_exists( ABSPATH . '.well-known/acme-challenge' ),
|
210 |
+
'certificate_exists' => file_exists( ABSPATH . 'keys/certificate.crt' ),
|
211 |
+
'server_software' => $_SERVER['SERVER_SOFTWARE'],
|
212 |
+
'http_host' => $_SERVER['HTTP_HOST'],
|
213 |
+
'pro' => ( wple_fs()->is__premium_only() ? 'PRO' : 'FREE' ),
|
214 |
+
);
|
215 |
+
$curlopts = array(
|
216 |
+
CURLOPT_RETURNTRANSFER => 1,
|
217 |
+
CURLOPT_POST => 1,
|
218 |
+
CURLOPT_URL => 'https://gowebsmarty.in/?catchwple=1',
|
219 |
+
CURLOPT_HEADER => false,
|
220 |
+
CURLOPT_POSTFIELDS => array(
|
221 |
+
'response' => $readlog,
|
222 |
+
'server' => json_encode( $srvr ),
|
223 |
+
),
|
224 |
+
CURLOPT_TIMEOUT => 30,
|
225 |
+
);
|
226 |
+
curl_setopt_array( $handle, $curlopts );
|
227 |
+
try {
|
228 |
+
curl_exec( $handle );
|
229 |
+
} catch ( Exception $e ) {
|
230 |
+
curl_close( $handle );
|
231 |
+
return;
|
232 |
+
}
|
233 |
+
curl_close( $handle );
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Send reverter code on force HTTPS
|
238 |
+
*
|
239 |
+
* @since 3.3.0
|
240 |
+
* @source le-admin.php
|
241 |
+
* @since 5.2.4
|
242 |
+
* @param string $revertcode
|
243 |
+
* @return void
|
244 |
+
*/
|
245 |
+
public static function wple_send_reverter_secret( $revertcode )
|
246 |
+
{
|
247 |
+
// $to = get_bloginfo('admin_email');
|
248 |
+
// $sub = esc_html__('You have successfully forced HTTPS on your site', 'wp-letsencrypt-ssl');
|
249 |
+
// $header = array('Content-Type: text/html; charset=UTF-8');
|
250 |
+
// $rcode = sanitize_text_field($revertcode);
|
251 |
+
// $body = SELF::wple_kses(__("HTTPS have been strictly forced on your site now!. In rare cases, this may cause issue / make the site un-accessible <b>IF</b> you dont have valid SSL certificate installed for your WordPress site. Kindly save the below <b>Secret code</b> to revert back to HTTP in such a case.", 'wp-letsencrypt-ssl')) . "
|
252 |
+
// <br><br>
|
253 |
+
// <strong>$rcode</strong><br><br>" .
|
254 |
+
// SELF::wple_kses(__("Opening the revert url will <b>IMMEDIATELY</b> turn back your site to HTTP protocol & revert back all the force SSL changes made by WP Encryption in one go!. Please follow instructions given at https://wordpress.org/support/topic/locked-out-unable-to-access-site-after-forcing-https-2/", 'wp-letsencrypt-ssl')) . "<br>
|
255 |
+
// <br>
|
256 |
+
// " . esc_html__("Revert url format", 'wp-letsencrypt-ssl') . ": http://yourdomainname.com/?reverthttps=SECRETCODE<br>
|
257 |
+
// " . esc_html__("Example:", 'wp-letsencrypt-ssl') . " http://wpencryption.com/?reverthttps=wple43643sg5qaw<br>
|
258 |
+
// <br>
|
259 |
+
// " . esc_html__("We have spent several hours to craft this plugin to perfectness. Please take a moment to rate us with 5 stars", 'wp-letsencrypt-ssl') . " - https://wordpress.org/support/plugin/wp-letsencrypt-ssl/reviews/#new-post
|
260 |
+
// <br />";
|
261 |
+
// wp_mail($to, $sub, $body, $header);
|
262 |
+
}
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Escape html but retain bold
|
266 |
+
*
|
267 |
+
* @since 3.3.3
|
268 |
+
* @source le-admin.php
|
269 |
+
* @since 5.2.4
|
270 |
+
* @param string $translated
|
271 |
+
* @param string $additional Additional allowed html tags
|
272 |
+
* @return void
|
273 |
+
*/
|
274 |
+
public static function wple_kses( $translated, $additional = '' )
|
275 |
+
{
|
276 |
+
$allowed = array(
|
277 |
+
'strong' => array(),
|
278 |
+
'b' => array(),
|
279 |
+
);
|
280 |
+
if ( $additional == 'a' ) {
|
281 |
+
$allowed['a'] = array(
|
282 |
+
'href' => array(),
|
283 |
+
'rel' => array(),
|
284 |
+
'target' => array(),
|
285 |
+
'title' => array(),
|
286 |
+
'data-tippy' => array(),
|
287 |
+
);
|
288 |
+
}
|
289 |
+
return wp_kses( $translated, $allowed );
|
290 |
+
}
|
291 |
+
|
292 |
+
public static function wple_verify_ssl( $domain )
|
293 |
+
{
|
294 |
+
$streamContext = stream_context_create( [
|
295 |
+
'ssl' => [
|
296 |
+
'verify_peer' => true,
|
297 |
+
],
|
298 |
+
] );
|
299 |
+
$errorDescription = $errorNumber = '';
|
300 |
+
$client = @stream_socket_client(
|
301 |
+
"ssl://{$domain}:443",
|
302 |
+
$errorNumber,
|
303 |
+
$errorDescription,
|
304 |
+
30,
|
305 |
+
STREAM_CLIENT_CONNECT,
|
306 |
+
$streamContext
|
307 |
+
);
|
308 |
+
return $client;
|
309 |
+
}
|
310 |
+
|
311 |
+
public static function compose_htaccess_rules( $spmode = false )
|
312 |
+
{
|
313 |
+
$rule = "\n" . "# BEGIN WP_Encryption_Force_SSL\n";
|
314 |
+
$rule .= "<IfModule mod_rewrite.c>" . "\n";
|
315 |
+
$rule .= "RewriteEngine on" . "\n";
|
316 |
+
$rule .= "RewriteCond %{HTTPS} !=on [NC]" . "\n";
|
317 |
+
|
318 |
+
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {
|
319 |
+
$rule .= "RewriteCond %{HTTP:X-Forwarded-Proto} !https" . "\n";
|
320 |
+
} elseif ( isset( $_SERVER['HTTP_X_PROTO'] ) && $_SERVER['HTTP_X_PROTO'] == 'SSL' ) {
|
321 |
+
$rule .= "RewriteCond %{HTTP:X-Proto} !SSL" . "\n";
|
322 |
+
} elseif ( isset( $_SERVER['HTTP_X_FORWARDED_SSL'] ) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on' ) {
|
323 |
+
$rule .= "RewriteCond %{HTTP:X-Forwarded-SSL} !on" . "\n";
|
324 |
+
} elseif ( isset( $_SERVER['HTTP_X_FORWARDED_SSL'] ) && $_SERVER['HTTP_X_FORWARDED_SSL'] == '1' ) {
|
325 |
+
$rule .= "RewriteCond %{HTTP:X-Forwarded-SSL} !=1" . "\n";
|
326 |
+
} elseif ( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) || $spmode ) {
|
327 |
+
$rule .= "RewriteCond %{HTTP:X-Forwarded-FOR} ^\$" . "\n";
|
328 |
+
} elseif ( isset( $_SERVER['HTTP_CF_VISITOR'] ) && $_SERVER['HTTP_CF_VISITOR'] == 'https' ) {
|
329 |
+
$rule .= "RewriteCond %{HTTP:CF-Visitor} '" . '"scheme":"http"' . "'" . "\n";
|
330 |
+
} elseif ( isset( $_SERVER['SERVER_PORT'] ) && '443' == $_SERVER['SERVER_PORT'] ) {
|
331 |
+
$rule .= "RewriteCond %{SERVER_PORT} !443" . "\n";
|
332 |
+
} elseif ( isset( $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] ) && $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] == 'https' ) {
|
333 |
+
$rule .= "RewriteCond %{HTTP:CloudFront-Forwarded-Proto} !https" . "\n";
|
334 |
+
} elseif ( isset( $_ENV['HTTPS'] ) && 'on' == $_ENV['HTTPS'] ) {
|
335 |
+
$rule .= "RewriteCond %{ENV:HTTPS} !=on" . "\n";
|
336 |
+
}
|
337 |
+
|
338 |
+
|
339 |
+
if ( is_multisite() ) {
|
340 |
+
global $wp_version ;
|
341 |
+
$sites = ( $wp_version >= 4.6 ? get_sites() : wp_get_sites() );
|
342 |
+
foreach ( $sites as $domn ) {
|
343 |
+
$domain = str_ireplace( array( "http://", "https://", "www." ), array( "", "", "" ), $domn->domain );
|
344 |
+
if ( FALSE != ($spos = stripos( $domain, '/' )) ) {
|
345 |
+
$domain = substr( $domain, 0, $spos );
|
346 |
+
}
|
347 |
+
$www = 'www.' . $domain;
|
348 |
+
$rule .= "RewriteCond %{HTTP_HOST} ^" . preg_quote( $domain, "/" ) . " [OR]" . "\n";
|
349 |
+
$rule .= "RewriteCond %{HTTP_HOST} ^" . preg_quote( $www, "/" ) . " [OR]" . "\n";
|
350 |
+
}
|
351 |
+
if ( count( $sites ) > 0 ) {
|
352 |
+
$rule = strrev( implode( "", explode( strrev( "[OR]" ), strrev( $rule ), 2 ) ) );
|
353 |
+
}
|
354 |
+
}
|
355 |
+
|
356 |
+
$rule .= "RewriteCond %{REQUEST_URI} !^/\\.well-known/acme-challenge/" . "\n";
|
357 |
+
$rule .= "RewriteRule ^(.*)\$ https://%{HTTP_HOST}/\$1 [R=301,L]" . "\n";
|
358 |
+
$rule .= "</IfModule>" . "\n";
|
359 |
+
$rule .= "# END WP_Encryption_Force_SSL" . "\n";
|
360 |
+
$finalrule = preg_replace( "/\n+/", "\n", $rule );
|
361 |
+
return $finalrule;
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* Get root domain
|
366 |
+
*
|
367 |
+
* @since 5.3.5
|
368 |
+
* @return void
|
369 |
+
*/
|
370 |
+
public static function get_root_domain( $removesubdir = true )
|
371 |
+
{
|
372 |
+
$currentdomain = esc_html( str_ireplace( array( 'http://', 'https://' ), array( '', '' ), site_url() ) );
|
373 |
+
|
374 |
+
if ( $removesubdir ) {
|
375 |
+
$slashpos = stripos( $currentdomain, '/' );
|
376 |
+
if ( FALSE !== $slashpos ) {
|
377 |
+
//subdir installation
|
378 |
+
$currentdomain = substr( $currentdomain, 0, $slashpos );
|
379 |
+
}
|
380 |
+
}
|
381 |
+
|
382 |
+
return $currentdomain;
|
383 |
+
}
|
384 |
+
|
385 |
+
public static function wple_copy_and_download( &$html )
|
386 |
+
{
|
387 |
+
$html .= '<span>
|
388 |
+
<ul class="step3-download">
|
389 |
+
<li class="le-dwnld">Certificate.crt <span class="copy-dwnld-icons">
|
390 |
+
<span class="dashicons dashicons-admin-page copycert" data-type="cert" title="Copy Certificate"></span><a href="?page=wp_encryption&le=1" title="download certificate"><span class="dashicons dashicons-download"></span></a>
|
391 |
+
</span>
|
392 |
+
</li>
|
393 |
+
<li class="le-dwnld">Private.pem <span class="copy-dwnld-icons">
|
394 |
+
<span class="dashicons dashicons-admin-page copycert" data-type="key" title="Copy Key"></span><a href="?page=wp_encryption&le=2" title="download key"><span class="dashicons dashicons-download"></span></a>
|
395 |
+
</span>
|
396 |
+
</li>
|
397 |
+
<li class="le-dwnld">CABundle.crt <span class="copy-dwnld-icons">
|
398 |
+
<span class="dashicons dashicons-admin-page copycert" data-type="cabundle" title="Copy Intermediate Certificate"></span><a href="?page=wp_encryption&le=3" title="download intermediate cert"><span class="dashicons dashicons-download"></span></a>
|
399 |
+
</span>
|
400 |
+
</li>
|
401 |
+
</ul>
|
402 |
+
<div class="crt-content">
|
403 |
+
<textarea readonly data-nc="' . wp_create_nonce( 'copycerts' ) . '"></textarea>
|
404 |
+
<div class="copied-success">Copied Successfully!</div>
|
405 |
+
</div>
|
406 |
+
</span> ';
|
407 |
+
}
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Pull domain verification related error details from LetsDebug API
|
411 |
+
*
|
412 |
+
* @since 5.4.6
|
413 |
+
* @param string $method
|
414 |
+
* @return void
|
415 |
+
*/
|
416 |
+
public static function wple_lets_debug( $method = "http-01" )
|
417 |
+
{
|
418 |
+
$domain = WPLE_Trait::get_root_domain();
|
419 |
+
|
420 |
+
if ( $method == 'http-01' ) {
|
421 |
+
$lc = get_option( 'wple_ldebug_lasthttp' );
|
422 |
+
|
423 |
+
if ( FALSE !== $lc && $lc <= strtotime( "-5 minutes" ) ) {
|
424 |
+
update_option( 'wple_ldebug_lasthttp', time() );
|
425 |
+
} else {
|
426 |
+
|
427 |
+
if ( FALSE === $lc ) {
|
428 |
+
update_option( 'wple_ldebug_lasthttp', time() );
|
429 |
+
} else {
|
430 |
+
return false;
|
431 |
+
// last check was done within last 15mins
|
432 |
+
}
|
433 |
+
|
434 |
+
}
|
435 |
+
|
436 |
+
} else {
|
437 |
+
$lc = get_option( 'wple_ldebug_lastdns' );
|
438 |
+
|
439 |
+
if ( FALSE !== $lc && $lc <= strtotime( "-5 minutes" ) ) {
|
440 |
+
update_option( 'wple_ldebug_lastdns', time() );
|
441 |
+
} else {
|
442 |
+
|
443 |
+
if ( FALSE === $lc ) {
|
444 |
+
update_option( 'wple_ldebug_lastdns', time() );
|
445 |
+
} else {
|
446 |
+
return false;
|
447 |
+
// last check was done within last 15mins
|
448 |
+
}
|
449 |
+
|
450 |
+
}
|
451 |
+
|
452 |
+
}
|
453 |
+
|
454 |
+
$apiResponse = wp_remote_post( 'https://letsdebug.net', [
|
455 |
+
'timeout' => '20',
|
456 |
+
'sslverify' => false,
|
457 |
+
'headers' => array(
|
458 |
+
'content-type' => 'application/json',
|
459 |
+
),
|
460 |
+
'body' => json_encode( [
|
461 |
+
'method' => $method,
|
462 |
+
'domain' => $domain,
|
463 |
+
] ),
|
464 |
+
] );
|
465 |
+
|
466 |
+
if ( !empty($apiResponse) && !is_wp_error( $apiResponse ) ) {
|
467 |
+
$body = ( !empty($apiResponse['body']) ? json_decode( $apiResponse['body'] ) : null );
|
468 |
+
$ID = ( !empty($body) && !empty($body->ID) ? (int) $body->ID : null );
|
469 |
+
|
470 |
+
if ( !empty($ID) ) {
|
471 |
+
sleep( 10 );
|
472 |
+
$apiResponse = wp_remote_get( 'https://letsdebug.net/' . $domain . '/' . $ID, [
|
473 |
+
'timeout' => '15',
|
474 |
+
'sslverify' => false,
|
475 |
+
'headers' => array(
|
476 |
+
'Accept' => 'application/json',
|
477 |
+
),
|
478 |
+
] );
|
479 |
+
|
480 |
+
if ( !empty($apiResponse) && !is_wp_error( $apiResponse ) ) {
|
481 |
+
$body = ( !empty($apiResponse['body']) ? json_decode( $apiResponse['body'] ) : null );
|
482 |
+
|
483 |
+
if ( !empty($body->result) && !empty($body->result->problems) ) {
|
484 |
+
$problems = $body->result->problems;
|
485 |
+
$err = false;
|
486 |
+
foreach ( $problems as $problem ) {
|
487 |
+
|
488 |
+
if ( in_array( strtolower( $problem->severity ), [ "error", "fatal" ] ) ) {
|
489 |
+
$err = true;
|
490 |
+
break;
|
491 |
+
}
|
492 |
+
|
493 |
+
}
|
494 |
+
|
495 |
+
if ( $err ) {
|
496 |
+
$output = '<ul id="wple-debug-errors">';
|
497 |
+
foreach ( $problems as $prob ) {
|
498 |
+
|
499 |
+
if ( in_array( strtolower( $prob->severity ), [ "error", "fatal" ] ) ) {
|
500 |
+
$output .= '<li><strong>' . esc_html( $prob->name ) . '</strong>: ' . esc_html( $prob->explanation ) . '</li>';
|
501 |
+
WPLE_Trait::wple_logger( "\n(LetsDebug) <strong>" . esc_html( $prob->name ) . "</strong>: " . esc_html( $prob->explanation ) . "\n" );
|
502 |
+
}
|
503 |
+
|
504 |
+
}
|
505 |
+
$output .= '</ul>';
|
506 |
+
return $output;
|
507 |
+
} else {
|
508 |
+
return false;
|
509 |
+
}
|
510 |
+
|
511 |
+
}
|
512 |
+
|
513 |
+
}
|
514 |
+
|
515 |
+
}
|
516 |
+
|
517 |
+
}
|
518 |
+
|
519 |
+
return false;
|
520 |
+
}
|
521 |
+
|
522 |
+
/**
|
523 |
+
* Compose Security Headers
|
524 |
+
*
|
525 |
+
* @since 5.5.0
|
526 |
+
* @param boolean $spmode
|
527 |
+
* @return void
|
528 |
+
*/
|
529 |
+
public static function compose_htaccess_security_rules()
|
530 |
+
{
|
531 |
+
$rule = "\n" . "# BEGIN WP_Encryption_Security_Headers\n";
|
532 |
+
$rule .= "<IfModule mod_headers.c>" . "\n";
|
533 |
+
$rule .= 'Header always set X-XSS-Protection "1; mode=block"' . "\n";
|
534 |
+
$rule .= 'Header always set Referrer-Policy: "no-referrer-when-downgrade"' . "\n";
|
535 |
+
$rule .= 'Header always set X-Content-Type-Options "nosniff"' . "\n";
|
536 |
+
$rule .= "</IfModule>" . "\n";
|
537 |
+
$rule .= "# END WP_Encryption_Security_Headers" . "\n";
|
538 |
+
$finalruleset = preg_replace( "/\n+/", "\n", $rule );
|
539 |
+
return $finalruleset;
|
540 |
+
}
|
541 |
+
|
542 |
+
public static function wple_clean_security_headers()
|
543 |
+
{
|
544 |
+
|
545 |
+
if ( is_writable( ABSPATH . '.htaccess' ) ) {
|
546 |
+
$htaccess = file_get_contents( ABSPATH . '.htaccess' );
|
547 |
+
$group = "/#\\s?BEGIN\\s?WP_Encryption_Security_Headers.*?#\\s?END\\s?WP_Encryption_Security_Headers/s";
|
548 |
+
|
549 |
+
if ( preg_match( $group, $htaccess ) ) {
|
550 |
+
$modhtaccess = preg_replace( $group, "", $htaccess );
|
551 |
+
file_put_contents( ABSPATH . '.htaccess', $modhtaccess );
|
552 |
+
}
|
553 |
+
|
554 |
+
}
|
555 |
+
|
556 |
+
}
|
557 |
+
|
558 |
+
/**
|
559 |
+
* cPanel existence check
|
560 |
+
* mx header support check
|
561 |
+
*
|
562 |
+
* @source le-activator.php moved to le-trait
|
563 |
+
*
|
564 |
+
* @since 5.6.1
|
565 |
+
* @return void
|
566 |
+
*/
|
567 |
+
public static function wple_cpanel_identity()
|
568 |
+
{
|
569 |
+
$host = site_url();
|
570 |
+
if ( FALSE != ($slashpos = stripos( $host, '/', 9 )) ) {
|
571 |
+
$host = substr( $host, 0, $slashpos );
|
572 |
+
}
|
573 |
+
$cp = $host . ':2083';
|
574 |
+
if ( FALSE === stripos( $host, 'https' ) ) {
|
575 |
+
$cp = $host . ':2082';
|
576 |
+
}
|
577 |
+
$response = wp_remote_get( $cp, [
|
578 |
+
'headers' => [
|
579 |
+
'Connection' => 'close',
|
580 |
+
],
|
581 |
+
'sslverify' => false,
|
582 |
+
'timeout' => 60,
|
583 |
+
] );
|
584 |
+
$cpanel = true;
|
585 |
+
if ( is_wp_error( $response ) ) {
|
586 |
+
$cpanel = false;
|
587 |
+
}
|
588 |
+
|
589 |
+
if ( $cpanel ) {
|
590 |
+
update_option( 'wple_have_cpanel', 1 );
|
591 |
+
} else {
|
592 |
+
if ( isset( $_SERVER['GD_PHP_HANDLER'] ) ) {
|
593 |
+
if ( $_SERVER['SERVER_SOFTWARE'] == 'Apache' && isset( $_SERVER['GD_PHP_HANDLER'] ) && $_SERVER['DOCUMENT_ROOT'] == '/var/www' ) {
|
594 |
+
update_option( 'wple_no_pricing', 1 );
|
595 |
+
}
|
596 |
+
}
|
597 |
+
update_option( 'wple_have_cpanel', 0 );
|
598 |
+
}
|
599 |
+
|
600 |
+
}
|
601 |
+
|
602 |
+
public static function wple_mx_support()
|
603 |
+
{
|
604 |
+
$mxpost = wp_remote_post( site_url( '/', 'https' ), array(
|
605 |
+
'headers' => 'Content-Type: application/csp-report',
|
606 |
+
) );
|
607 |
+
|
608 |
+
if ( is_wp_error( $mxpost ) || isset( $mxpost['response'] ) && isset( $mxpost['response']['code'] ) && $mxpost['response']['code'] != 200 ) {
|
609 |
+
update_option( 'wple_mx', 0 );
|
610 |
+
} else {
|
611 |
+
update_option( 'wple_mx', 1 );
|
612 |
+
}
|
613 |
+
|
614 |
+
}
|
615 |
+
|
616 |
+
}
|
freemius/LICENSE.txt
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
{one line to give the program's name and a brief idea of what it does.}
|
635 |
+
Copyright (C) {year} {name of author}
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
{project} Copyright (C) {year} {fullname}
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
freemius/assets/css/admin/account.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.fs-notice[data-id="license_not_whitelabeled"].success,.fs-notice[data-id="license_whitelabeled"].success{color:inherit;border-left-color:#00a0d2}.fs-notice[data-id="license_not_whitelabeled"].success label.fs-plugin-title,.fs-notice[data-id="license_whitelabeled"].success label.fs-plugin-title{display:none}#fs_account .postbox,#fs_account .widefat{max-width:800px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}.fs-field-beta_program label{margin-left:7px}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
|
freemius/assets/css/admin/add-ons.css
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
.fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner>ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner>ul>li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner .fs-badge.fs-installed-addon-badge{font-size:1.02em;line-height:1.3em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button,#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button-group{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
|
2 |
+
#TB_window,#TB_window iframe{width:821px !important}#plugin-information .fyi{width:266px !important}#plugin-information #section-holder{margin-right:299px}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description iframe{max-width:100%}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button,#plugin-information .fs-dropdown .button-group .button{position:relative;width:auto;top:0;right:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .button:focus,#plugin-information .fs-dropdown .button-group .button:focus{z-index:10}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .button-group .fs-dropdown-arrow,#plugin-information .fs-dropdown .button-group .fs-dropdown-arrow{border-top:6px solid white;border-right:4px solid transparent;border-left:4px solid transparent;top:12px;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active:not(.up) .button:not(.fs-dropdown-arrow-button){border-bottom-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active:not(.up) .fs-dropdown-arrow-button{border-bottom-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button),#plugin-information .fs-dropdown.active.up .button:not(.fs-dropdown-arrow-button){border-top-left-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.active.up .fs-dropdown-arrow-button,#plugin-information .fs-dropdown.active.up .fs-dropdown-arrow-button{border-top-right-radius:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list,#plugin-information .fs-dropdown .fs-dropdown-list{position:absolute;right:-1px;top:100%;margin-left:auto;padding:3px 0;border:1px solid #bfbfbf;background-color:#fff;z-index:1;width:230px;text-align:left;-moz-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);-webkit-box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12);box-shadow:0px 2px 4px -1px rgba(0,0,0,0.2),0px 4px 5px 0px rgba(0,0,0,0.14),0px 1px 10px 0px rgba(0,0,0,0.12)}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li,#plugin-information .fs-dropdown .fs-dropdown-list li{margin:0}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li a,#plugin-information .fs-dropdown .fs-dropdown-list li a{display:block;padding:5px 10px;text-decoration:none;text-shadow:none}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover,#plugin-information .fs-dropdown .fs-dropdown-list li:hover{background-color:#0074a3;color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown .fs-dropdown-list li:hover a,#plugin-information .fs-dropdown .fs-dropdown-list li:hover a{color:#fff}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown:not(.up) .fs-dropdown-list,#plugin-information .fs-dropdown:not(.up) .fs-dropdown-list{-moz-border-radius:3px 0 3px 3px;-webkit-border-radius:3px 0 3px 3px;border-radius:3px 0 3px 3px}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-dropdown.up .fs-dropdown-list,#plugin-information .fs-dropdown.up .fs-dropdown-list{-moz-border-radius:3px 3px 0 3px;-webkit-border-radius:3px 3px 0 3px;border-radius:3px 3px 0 3px}#plugin-information .fs-dropdown .button-group{width:100%}#plugin-information .fs-dropdown .button-group .button{float:none;font-size:14px;font-weight:normal;text-transform:none}#plugin-information .fs-dropdown .fs-dropdown-list{margin-top:1px}#plugin-information .fs-dropdown.up .fs-dropdown-list{top:auto;bottom:100%;margin-bottom:2px}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group{text-align:center;display:table}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button{display:table-cell}#plugin-information.wp-core-ui .fs-pricing-body .fs-dropdown .button-group .button:not(.fs-dropdown-arrow-button){left:1px;width:100%}#plugin-information-footer>.button,#plugin-information-footer .fs-dropdown{position:relative;top:3px}#plugin-information-footer>.button.left,#plugin-information-footer .fs-dropdown.left{float:left}#plugin-information-footer>.right,#plugin-information-footer .fs-dropdown{float:right}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
|
freemius/assets/css/admin/affiliation.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
@charset "UTF-8";#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:'✓';margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
|
freemius/assets/css/admin/checkout.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
@media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}
|
freemius/assets/css/admin/common.css
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
.fs-badge{position:absolute;top:10px;right:0;background:#71ae00;color:white;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3)}.theme-browser .theme .fs-premium-theme-badge-container{position:absolute;right:0;top:0}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge{position:relative;top:0;margin-top:10px;text-align:center}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-premium-theme-badge{font-size:1.1em}.theme-browser .theme .fs-premium-theme-badge-container .fs-badge.fs-beta-theme-badge{background:#00a0d2}.fs-switch{position:relative;display:inline-block;color:#ccc;text-shadow:0 1px 1px rgba(255,255,255,0.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);background:#ececec;box-shadow:0 0 4px rgba(0,0,0,0.1),inset 0 1px 3px 0 rgba(0,0,0,0.1);cursor:pointer}.fs-switch span{display:inline-block;width:35px;text-transform:uppercase}.fs-switch .fs-toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.3);border-radius:4px;background:#fff;background-color:#fff;background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #ececec), color-stop(1, #fff));background-image:-webkit-linear-gradient(top, #ececec, #fff);background-image:-moz-linear-gradient(top, #ececec, #fff);background-image:-ms-linear-gradient(top, #ececec, #fff);background-image:-o-linear-gradient(top, #ececec, #fff);background-image:linear-gradient(top, bottom, #ececec, #fff);box-shadow:inset 0 1px 0 0 rgba(255,255,255,0.5);z-index:999;-moz-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-o-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-ms-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);-webkit-transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1);transition:0.4s cubic-bezier(0.54, 1.6, 0.5, 1)}.fs-switch.fs-off .fs-toggle{left:2%}.fs-switch.fs-on .fs-toggle{left:54%}.fs-switch.fs-round{top:8px;padding:4px 25px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round .fs-toggle{top:0;width:24px;height:24px;-moz-border-radius:24px;-webkit-border-radius:24px;border-radius:24px}.fs-switch.fs-round.fs-off .fs-toggle{left:-1px}.fs-switch.fs-round.fs-on{background:#0085ba}.fs-switch.fs-round.fs-on .fs-toggle{left:25px}.fs-switch.fs-small.fs-round{padding:1px 19px}.fs-switch.fs-small.fs-round .fs-toggle{top:0;width:18px;height:18px;-moz-border-radius:18px;-webkit-border-radius:18px;border-radius:18px}.fs-switch.fs-small.fs-round.fs-on .fs-toggle{left:19px}.fs-switch-feedback{margin-left:10px}.fs-switch-feedback.success{color:#71ae00}.rtl .fs-switch-feedback{margin-left:0;margin-right:10px}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
|
2 |
+
.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 1250px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain;margin-bottom:-2px}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
|
freemius/assets/css/admin/connect.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key .fs-sites-list-container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions>.fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li>i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li .fs-switch{float:right}#fs_connect .fs-permissions ul li .fs-permission-description{margin-left:55px}#fs_connect .fs-permissions ul li .fs-permission-description span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li .fs-permission-description p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{overflow:initial;height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff !important;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:-17px;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left;text-transform:none !important}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right;left:auto;right:-17px}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li .fs-permission-description{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li .fs-switch{float:left}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}#license_issues_link{display:block;text-align:center;font-size:0.9em;margin-top:10px}
|
freemius/assets/css/admin/debug.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.fs-switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
|
freemius/assets/css/admin/dialog-boxes.css
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .dashicons{vertical-align:middle}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-success .fs-modal-header{border-bottom-color:#46b450}.fs-modal.fs-success .fs-modal-body{background-color:#f7fff7}.fs-modal.fs-warn .fs-modal-header{border-bottom-color:#ffb900}.fs-modal.fs-warn .fs-modal-body{background-color:#fff8e5}.fs-modal.fs-error .fs-modal-header{border-bottom-color:#dc3232}.fs-modal.fs-error .fs-modal-body{background-color:#ffeaea}.fs-modal .fs-modal-body,.fs-modal .fs-modal-footer{border:0;background:#fefefe;padding:20px}.fs-modal .fs-modal-header{border-bottom:#eeeeee solid 1px;background:#fbfbfb;padding:15px 20px;position:relative;margin-bottom:-10px}.fs-modal .fs-modal-header h4{margin:0;padding:0;text-transform:uppercase;font-size:1.2em;font-weight:bold;color:#cacaca;text-shadow:1px 1px 1px #fff;letter-spacing:0.6px;-webkit-font-smoothing:antialiased}.fs-modal .fs-modal-header .fs-close{position:absolute;right:10px;top:12px;cursor:pointer;color:#bbb;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;padding:3px;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;-ms-transition:all 0.2s ease-in-out;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.fs-modal .fs-modal-header .fs-close:hover{color:#fff;background:#aaa}.fs-modal .fs-modal-header .fs-close .dashicons,.fs-modal .fs-modal-header .fs-close:hover .dashicons{text-decoration:none}.fs-modal .fs-modal-body{border-bottom:0}.fs-modal .fs-modal-body p{font-size:14px}.fs-modal .fs-modal-body h2{font-size:20px;line-height:1.5em}.fs-modal .fs-modal-body>div{margin-top:10px}.fs-modal .fs-modal-body>div h2{font-weight:bold;font-size:20px;margin-top:0}.fs-modal .fs-modal-footer{border-top:#eeeeee solid 1px;text-align:right}.fs-modal .fs-modal-footer>.button{margin:0 7px}.fs-modal .fs-modal-footer>.button:first-child{margin:0}.fs-modal .fs-modal-panel>.notice.inline{margin:0;display:none}.fs-modal .fs-modal-panel:not(.active){display:none}.rtl .fs-modal .fs-modal-header .fs-close{right:auto;left:20px}body.has-fs-modal{overflow:hidden}.fs-modal.fs-modal-deactivation-feedback .reason-input,.fs-modal.fs-modal-deactivation-feedback .internal-message{margin:3px 0 3px 22px}.fs-modal.fs-modal-deactivation-feedback .reason-input input,.fs-modal.fs-modal-deactivation-feedback .reason-input textarea,.fs-modal.fs-modal-deactivation-feedback .internal-message input,.fs-modal.fs-modal-deactivation-feedback .internal-message textarea{width:100%}.fs-modal.fs-modal-deactivation-feedback li.reason.has-internal-message .internal-message{border:1px solid #ccc;padding:7px;display:none}@media (max-width: 650px){.fs-modal.fs-modal-deactivation-feedback li.reason li.reason{margin-bottom:10px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .reason-input,.fs-modal.fs-modal-deactivation-feedback li.reason li.reason .internal-message{margin-left:29px}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label{display:table}.fs-modal.fs-modal-deactivation-feedback li.reason li.reason label>span{display:table-cell;font-size:1.3em}}.fs-modal.fs-modal-deactivation-feedback .anonymous-feedback-label{float:left}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel{margin-top:0 !important}.fs-modal.fs-modal-deactivation-feedback .fs-modal-panel h3{margin-top:0;line-height:1.5em}#the-list .deactivate>.fs-slug{display:none}.fs-modal.fs-modal-subscription-cancellation .fs-price-increase-warning{color:red;font-weight:bold;padding:0 25px;margin-bottom:0}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:left;top:5px;position:relative}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label input{float:right}.fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{display:block;margin-left:24px}.rtl .fs-modal.fs-modal-subscription-cancellation ul.subscription-actions label span{margin-left:0;margin-right:24px}.fs-modal.fs-modal-license-activation .fs-modal-body input.fs-license-key{width:100%}.fs-license-options-container table,.fs-license-options-container table select,.fs-license-options-container table .fs-available-license-key{width:100%}.fs-license-options-container table td:first-child{width:1%}.fs-license-options-container table .fs-other-license-key-container label{position:relative;top:6px;float:left;margin-right:5px}.fs-license-options-container table .fs-other-license-key-container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}.fs-license-options-container table .fs-other-license-key-container div input{margin:0}.fs-sites-list-container td{cursor:pointer}.fs-modal.fs-modal-user-change .fs-modal-body input#fs_other_email_address{width:100%}.fs-user-change-options-container table{width:100%;border-collapse:collapse}.fs-user-change-options-container table tr{display:block;margin-bottom:2px}.fs-user-change-options-container table .fs-email-address-container td{display:inline-block}.fs-user-change-options-container table .fs-email-address-container input[type="radio"]{margin-bottom:0;margin-top:0}.fs-user-change-options-container table .fs-other-email-address-container{width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div{display:table;width:100%}.fs-user-change-options-container table .fs-other-email-address-container>div label,.fs-user-change-options-container table .fs-other-email-address-container>div>div{display:table-cell}.fs-user-change-options-container table .fs-other-email-address-container>div label{width:1%;padding-left:3px;padding-right:3px}.fs-user-change-options-container table .fs-other-email-address-container>div>div{width:auto}.fs-user-change-options-container table .fs-other-email-address-container>div>div input{width:100%}.fs-modal.fs-modal-developer-license-debug-mode .fs-modal-body input.fs-license-or-user-key{width:100%}.fs-multisite-options-container{margin-top:10px;border:1px solid #ccc;padding:5px}.fs-multisite-options-container a{text-decoration:none}.fs-multisite-options-container a:focus{box-shadow:none}.fs-multisite-options-container a.selected{font-weight:bold}.fs-multisite-options-container.fs-apply-on-all-sites{border:0 none;padding:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options{border-spacing:0}.fs-multisite-options-container.fs-apply-on-all-sites .fs-all-sites-options td:not(:first-child){display:none}.fs-multisite-options-container .fs-sites-list-container{display:none;overflow:auto}.fs-multisite-options-container .fs-sites-list-container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-modal.fs-modal-license-key-resend .email-address-container{overflow:hidden;padding-right:2px}.fs-modal.fs-modal-license-key-resend.fs-freemium input.email-address{width:300px}.fs-modal.fs-modal-license-key-resend.fs-freemium label{display:block;margin-bottom:10px}.fs-modal.fs-modal-license-key-resend.fs-premium input.email-address{width:100%}.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{float:right;margin-left:7px}@media (max-width: 650px){.fs-modal.fs-modal-license-key-resend.fs-premium .button-container{margin-top:2px}}
|
2 |
+
.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .input-container>.email-address-container{padding-left:2px;padding-right:0}.rtl .fs-modal.fs-modal-license-key-resend .fs-modal-body .button-container{float:left;margin-right:7px;margin-left:0}a.show-license-resend-modal{margin-top:4px;display:inline-block}.fs-ajax-loader{position:relative;width:170px;height:20px;margin:auto}.fs-ajax-loader .fs-ajax-loader-bar{position:absolute;top:0;background-color:#0074a3;width:20px;height:20px;-webkit-animation-name:bounce_ajaxLoader;-moz-animation-name:bounce_ajaxLoader;-ms-animation-name:bounce_ajaxLoader;-o-animation-name:bounce_ajaxLoader;animation-name:bounce_ajaxLoader;-webkit-animation-duration:1.5s;-moz-animation-duration:1.5s;-ms-animation-duration:1.5s;-o-animation-duration:1.5s;animation-duration:1.5s;animation-iteration-count:infinite;-o-animation-iteration-count:infinite;-ms-animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;-moz-animation-iteration-count:infinite;-webkit-animation-direction:normal;-moz-animation-direction:normal;-ms-animation-direction:normal;-o-animation-direction:normal;animation-direction:normal;-moz-transform:0.3;-o-transform:0.3;-ms-transform:0.3;-webkit-transform:0.3;transform:0.3}.fs-ajax-loader .fs-ajax-loader-bar-1{left:0px;animation-delay:0.6s;-o-animation-delay:0.6s;-ms-animation-delay:0.6s;-webkit-animation-delay:0.6s;-moz-animation-delay:0.6s}.fs-ajax-loader .fs-ajax-loader-bar-2{left:19px;animation-delay:0.75s;-o-animation-delay:0.75s;-ms-animation-delay:0.75s;-webkit-animation-delay:0.75s;-moz-animation-delay:0.75s}.fs-ajax-loader .fs-ajax-loader-bar-3{left:38px;animation-delay:0.9s;-o-animation-delay:0.9s;-ms-animation-delay:0.9s;-webkit-animation-delay:0.9s;-moz-animation-delay:0.9s}.fs-ajax-loader .fs-ajax-loader-bar-4{left:57px;animation-delay:1.05s;-o-animation-delay:1.05s;-ms-animation-delay:1.05s;-webkit-animation-delay:1.05s;-moz-animation-delay:1.05s}.fs-ajax-loader .fs-ajax-loader-bar-5{left:76px;animation-delay:1.2s;-o-animation-delay:1.2s;-ms-animation-delay:1.2s;-webkit-animation-delay:1.2s;-moz-animation-delay:1.2s}.fs-ajax-loader .fs-ajax-loader-bar-6{left:95px;animation-delay:1.35s;-o-animation-delay:1.35s;-ms-animation-delay:1.35s;-webkit-animation-delay:1.35s;-moz-animation-delay:1.35s}.fs-ajax-loader .fs-ajax-loader-bar-7{left:114px;animation-delay:1.5s;-o-animation-delay:1.5s;-ms-animation-delay:1.5s;-webkit-animation-delay:1.5s;-moz-animation-delay:1.5s}.fs-ajax-loader .fs-ajax-loader-bar-8{left:133px;animation-delay:1.65s;-o-animation-delay:1.65s;-ms-animation-delay:1.65s;-webkit-animation-delay:1.65s;-moz-animation-delay:1.65s}@-moz-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-ms-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-o-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@-webkit-keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}@keyframes bounce_ajaxLoader{0%{-moz-transform:scale(1);-o-transform:scale(1);-ms-transform:scale(1);-webkit-transform:scale(1);transform:scale(1);background-color:#0074a3}100%{-moz-transform:scale(0.3);-o-transform:scale(0.3);-ms-transform:scale(0.3);-webkit-transform:scale(0.3);transform:scale(0.3);background-color:#fff}}.fs-modal-auto-install #request-filesystem-credentials-form h2,.fs-modal-auto-install #request-filesystem-credentials-form .request-filesystem-credentials-action-buttons{display:none}.fs-modal-auto-install #request-filesystem-credentials-form input[type=password],.fs-modal-auto-install #request-filesystem-credentials-form input[type=email],.fs-modal-auto-install #request-filesystem-credentials-form input[type=text]{-webkit-appearance:none;padding:10px 10px 5px 10px;width:300px;max-width:100%}.fs-modal-auto-install #request-filesystem-credentials-form>div,.fs-modal-auto-install #request-filesystem-credentials-form label,.fs-modal-auto-install #request-filesystem-credentials-form fieldset{width:300px;max-width:100%;margin:0 auto;display:block}.button-primary.warn{box-shadow:0 1px 0 #d2593c;text-shadow:0 -1px 1px #d2593c,1px 0 1px #d2593c,0 1px 1px #d2593c,-1px 0 1px #d2593c;background:#f56a48;border-color:#ec6544 #d2593c #d2593c}.button-primary.warn:hover{background:#fd6d4a;border-color:#d2593c}.button-primary.warn:focus{box-shadow:0 1px 0 #dd6041,0 0 2px 1px #e4a796}.button-primary.warn:active{background:#dd6041;border-color:#d2593c;box-shadow:inset 0 2px 0 #d2593c}.button-primary.warn.disabled{color:#f5b3a1 !important;background:#e76444 !important;border-color:#d85e40 !important;text-shadow:0 -1px 0 rgba(0,0,0,0.1) !important}
|
freemius/assets/css/admin/gdpr-optin-notice.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.fs-notice[data-id^="gdpr_optin_actions"] .underlined{text-decoration:underline}.fs-notice[data-id^="gdpr_optin_actions"] ul .button,.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{vertical-align:middle}.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{display:inline-block;margin-left:3px}
|
freemius/assets/css/admin/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/assets/css/admin/plugins.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
label.fs-tag,span.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn,span.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-info,span.fs-tag.fs-info{background:#00a0d2}label.fs-tag.fs-success,span.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error,span.fs-tag.fs-error{background:#dc3232}.wp-list-table.plugins .plugin-title span.fs-tag{display:inline-block;margin-left:5px;line-height:10px}
|
freemius/assets/css/customizer.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
#fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:#000;color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}#customize-theme-controls #accordion-section-freemius_upsell{border-top:1px solid #0085ba !important;border-bottom:1px solid #0085ba !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title{color:#fff;background-color:#0085ba;border-left:4px solid #0085ba;transition:.15s background-color ease-in-out, .15s border-color ease-in-out;outline:none;border-bottom:none !important}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:hover{background-color:#008ec2;border-left-color:#0073aa}#customize-theme-controls #accordion-section-freemius_upsell h3.accordion-section-title:after{color:#fff}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title{border-left:none;border-right:4px solid #0085ba}#customize-theme-controls #accordion-section-freemius_upsell .rtl h3.accordion-section-title:hover{border-right-color:#0073aa}
|
freemius/assets/css/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/assets/img/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/assets/img/plugin-icon.png
ADDED
Binary file
|
freemius/assets/img/theme-icon.png
ADDED
Binary file
|
freemius/assets/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/assets/js/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
3 |
+
// Hide file structure from users on unprotected servers.
|
freemius/assets/js/nojquery.ba-postmessage.js
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* jQuery postMessage - v0.5 - 9/11/2009
|
3 |
+
* http://benalman.com/projects/jquery-postmessage-plugin/
|
4 |
+
*
|
5 |
+
* Copyright (c) 2009 "Cowboy" Ben Alman
|
6 |
+
* Dual licensed under the MIT and GPL licenses.
|
7 |
+
* http://benalman.com/about/license/
|
8 |
+
*
|
9 |
+
* Non-jQuery fork by Jeff Lee
|
10 |
+
*
|
11 |
+
* This fork consists of the following changes:
|
12 |
+
* 1. Basic code cleanup and restructuring, for legibility.
|
13 |
+
* 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
|
14 |
+
* in terms of both function names and object scope. Scope is specified by
|
15 |
+
* the the "this" context of NoJQueryPostMessageMixin();
|
16 |
+
* 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
|
17 |
+
* at least three different GitHub users requesting the removal of this
|
18 |
+
* "Opera sniff" on the original project's Issues page, so I figured this
|
19 |
+
* would be a relatively safe change.
|
20 |
+
* 4. `postMessage` no longer uses `$.param` to serialize messages that are not
|
21 |
+
* strings. I actually prefer this structure anyway. `receiveMessage` does
|
22 |
+
* not implement a corresponding deserialization step, and as such it seems
|
23 |
+
* cleaner and more symmetric to leave both data serialization and
|
24 |
+
* deserialization to the client.
|
25 |
+
* 5. The use of `$.isFunction` is replaced by a functionally-identical check.
|
26 |
+
* 6. The `$:nomunge` YUI option is no longer necessary.
|
27 |
+
*/
|
28 |
+
|
29 |
+
function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
|
30 |
+
|
31 |
+
var setMessageCallback, unsetMessageCallback, currentMsgCallback,
|
32 |
+
intervalId, lastHash, cacheBust = 1;
|
33 |
+
|
34 |
+
if (window.postMessage) {
|
35 |
+
|
36 |
+
if (window.addEventListener) {
|
37 |
+
setMessageCallback = function(callback) {
|
38 |
+
window.addEventListener('message', callback, false);
|
39 |
+
}
|
40 |
+
|
41 |
+
unsetMessageCallback = function(callback) {
|
42 |
+
window.removeEventListener('message', callback, false);
|
43 |
+
}
|
44 |
+
} else {
|
45 |
+
setMessageCallback = function(callback) {
|
46 |
+
window.attachEvent('onmessage', callback);
|
47 |
+
}
|
48 |
+
|
49 |
+
unsetMessageCallback = function(callback) {
|
50 |
+
window.detachEvent('onmessage', callback);
|
51 |
+
}
|
52 |
+
}
|
53 |
+
|
54 |
+
this[postBinding] = function(message, targetUrl, target) {
|
55 |
+
if (!targetUrl) {
|
56 |
+
return;
|
57 |
+
}
|
58 |
+
|
59 |
+
// The browser supports window.postMessage, so call it with a targetOrigin
|
60 |
+
// set appropriately, based on the targetUrl parameter.
|
61 |
+
target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
|
62 |
+
}
|
63 |
+
|
64 |
+
// Since the browser supports window.postMessage, the callback will be
|
65 |
+
// bound to the actual event associated with window.postMessage.
|
66 |
+
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
67 |
+
// Unbind an existing callback if it exists.
|
68 |
+
if (currentMsgCallback) {
|
69 |
+
unsetMessageCallback(currentMsgCallback);
|
70 |
+
currentMsgCallback = null;
|
71 |
+
}
|
72 |
+
|
73 |
+
if (!callback) {
|
74 |
+
return false;
|
75 |
+
}
|
76 |
+
|
77 |
+
// Bind the callback. A reference to the callback is stored for ease of
|
78 |
+
// unbinding.
|
79 |
+
currentMsgCallback = setMessageCallback(function(e) {
|
80 |
+
switch(Object.prototype.toString.call(sourceOrigin)) {
|
81 |
+
case '[object String]':
|
82 |
+
if (sourceOrigin !== e.origin) {
|
83 |
+
return false;
|
84 |
+
}
|
85 |
+
break;
|
86 |
+
case '[object Function]':
|
87 |
+
if (sourceOrigin(e.origin)) {
|
88 |
+
return false;
|
89 |
+
}
|
90 |
+
break;
|
91 |
+
}
|
92 |
+
|
93 |
+
callback(e);
|
94 |
+
});
|
95 |
+
};
|
96 |
+
|
97 |
+
} else {
|
98 |
+
|
99 |
+
this[postBinding] = function(message, targetUrl, target) {
|
100 |
+
if (!targetUrl) {
|
101 |
+
return;
|
102 |
+
}
|
103 |
+
|
104 |
+
// The browser does not support window.postMessage, so set the location
|
105 |
+
// of the target to targetUrl#message. A bit ugly, but it works! A cache
|
106 |
+
// bust parameter is added to ensure that repeat messages trigger the
|
107 |
+
// callback.
|
108 |
+
target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
|
109 |
+
}
|
110 |
+
|
111 |
+
// Since the browser sucks, a polling loop will be started, and the
|
112 |
+
// callback will be called whenever the location.hash changes.
|
113 |
+
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
114 |
+
if (intervalId) {
|
115 |
+
clearInterval(intervalId);
|
116 |
+
intervalId = null;
|
117 |
+
}
|
118 |
+
|
119 |
+
if (callback) {
|
120 |
+
delay = typeof sourceOrigin === 'number'
|
121 |
+
? sourceOrigin
|
122 |
+
: typeof delay === 'number'
|
123 |
+
? delay
|
124 |
+
: 100;
|
125 |
+
|
126 |
+
intervalId = setInterval(function(){
|
127 |
+
var hash = document.location.hash,
|
128 |
+
re = /^#?\d+&/;
|
129 |
+
if ( hash !== lastHash && re.test( hash ) ) {
|
130 |
+
lastHash = hash;
|
131 |
+
callback({ data: hash.replace( re, '' ) });
|
132 |
+
}
|
133 |
+
}, delay );
|
134 |
+
}
|
135 |
+
};
|
136 |
+
|
137 |
+
}
|
138 |
+
|
139 |
+
return this;
|
140 |
+
}
|
freemius/assets/js/nojquery.ba-postmessage.min.js
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* nojquery-postmessage by Jeff Lee
|
3 |
+
* a non-jQuery fork of:
|
4 |
+
*
|
5 |
+
* jQuery postMessage - v0.5 - 9/11/2009
|
6 |
+
* http://benalman.com/projects/jquery-postmessage-plugin/
|
7 |
+
*
|
8 |
+
* Copyright (c) 2009 "Cowboy" Ben Alman
|
9 |
+
* Dual licensed under the MIT and GPL licenses.
|
10 |
+
* http://benalman.com/about/license/
|
11 |
+
*/
|
12 |
+
function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
|
freemius/assets/js/postmessage.js
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function ($, undef) {
|
2 |
+
var global = this;
|
3 |
+
|
4 |
+
// Namespace.
|
5 |
+
global.FS = global.FS || {};
|
6 |
+
|
7 |
+
global.FS.PostMessage = function ()
|
8 |
+
{
|
9 |
+
var
|
10 |
+
_is_child = false,
|
11 |
+
_postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
|
12 |
+
_callbacks = {},
|
13 |
+
_base_url,
|
14 |
+
_parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
|
15 |
+
_parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
|
16 |
+
_init = function () {
|
17 |
+
_postman.receiveMessage(function (e) {
|
18 |
+
var data = JSON.parse(e.data);
|
19 |
+
|
20 |
+
if (_callbacks[data.type]) {
|
21 |
+
for (var i = 0; i < _callbacks[data.type].length; i++) {
|
22 |
+
// Execute type callbacks.
|
23 |
+
_callbacks[data.type][i](data.data);
|
24 |
+
}
|
25 |
+
}
|
26 |
+
}, _base_url);
|
27 |
+
},
|
28 |
+
_hasParent = ('' !== _parent_url),
|
29 |
+
$window = $(window),
|
30 |
+
$html = $('html');
|
31 |
+
|
32 |
+
return {
|
33 |
+
init : function (url, iframes)
|
34 |
+
{
|
35 |
+
_base_url = url;
|
36 |
+
_init();
|
37 |
+
|
38 |
+
// Automatically receive forward messages.
|
39 |
+
FS.PostMessage.receiveOnce('forward', function (data){
|
40 |
+
window.location = data.url;
|
41 |
+
});
|
42 |
+
|
43 |
+
iframes = iframes || [];
|
44 |
+
|
45 |
+
if (iframes.length > 0) {
|
46 |
+
$window.on('scroll', function () {
|
47 |
+
for (var i = 0; i < iframes.length; i++) {
|
48 |
+
FS.PostMessage.postScroll(iframes[i]);
|
49 |
+
}
|
50 |
+
});
|
51 |
+
}
|
52 |
+
},
|
53 |
+
init_child : function ()
|
54 |
+
{
|
55 |
+
this.init(_parent_subdomain);
|
56 |
+
|
57 |
+
_is_child = true;
|
58 |
+
|
59 |
+
// Post height of a child right after window is loaded.
|
60 |
+
$(window).bind('load', function () {
|
61 |
+
FS.PostMessage.postHeight();
|
62 |
+
|
63 |
+
// Post message that window was loaded.
|
64 |
+
FS.PostMessage.post('loaded');
|
65 |
+
});
|
66 |
+
},
|
67 |
+
hasParent : function ()
|
68 |
+
{
|
69 |
+
return _hasParent;
|
70 |
+
},
|
71 |
+
postHeight : function (diff, wrapper) {
|
72 |
+
diff = diff || 0;
|
73 |
+
wrapper = wrapper || '#wrap_section';
|
74 |
+
this.post('height', {
|
75 |
+
height: diff + $(wrapper).outerHeight(true)
|
76 |
+
});
|
77 |
+
},
|
78 |
+
postScroll : function (iframe) {
|
79 |
+
this.post('scroll', {
|
80 |
+
top: $window.scrollTop(),
|
81 |
+
height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
|
82 |
+
}, iframe);
|
83 |
+
},
|
84 |
+
post : function (type, data, iframe)
|
85 |
+
{
|
86 |
+
console.debug('PostMessage.post', type);
|
87 |
+
|
88 |
+
if (iframe)
|
89 |
+
{
|
90 |
+
// Post to iframe.
|
91 |
+
_postman.postMessage(JSON.stringify({
|
92 |
+
type: type,
|
93 |
+
data: data
|
94 |
+
}), iframe.src, iframe.contentWindow);
|
95 |
+
}
|
96 |
+
else {
|
97 |
+
// Post to parent.
|
98 |
+
_postman.postMessage(JSON.stringify({
|
99 |
+
type: type,
|
100 |
+
data: data
|
101 |
+
}), _parent_url, window.parent);
|
102 |
+
}
|
103 |
+
},
|
104 |
+
receive: function (type, callback)
|
105 |
+
{
|
106 |
+
console.debug('PostMessage.receive', type);
|
107 |
+
|
108 |
+
if (undef === _callbacks[type])
|
109 |
+
_callbacks[type] = [];
|
110 |
+
|
111 |
+
_callbacks[type].push(callback);
|
112 |
+
},
|
113 |
+
receiveOnce: function (type, callback)
|
114 |
+
{
|
115 |
+
if (this.is_set(type))
|
116 |
+
return;
|
117 |
+
|
118 |
+
this.receive(type, callback);
|
119 |
+
},
|
120 |
+
// Check if any callbacks assigned to a specified message type.
|
121 |
+
is_set: function (type)
|
122 |
+
{
|
123 |
+
return (undef != _callbacks[type]);
|
124 |
+
},
|
125 |
+
parent_url: function ()
|
126 |
+
{
|
127 |
+
return _parent_url;
|
128 |
+
},
|
129 |
+
parent_subdomain: function ()
|
130 |
+
{
|
131 |
+
return _parent_subdomain;
|
132 |
+
}
|
133 |
+
};
|
134 |
+
}();
|
135 |
+
})(jQuery);
|
freemius/config.php
ADDED
@@ -0,0 +1,391 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.4
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
if ( ! defined( 'WP_FS__SLUG' ) ) {
|
14 |
+
define( 'WP_FS__SLUG', 'freemius' );
|
15 |
+
}
|
16 |
+
if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
|
17 |
+
define( 'WP_FS__DEV_MODE', false );
|
18 |
+
}
|
19 |
+
|
20 |
+
#--------------------------------------------------------------------------------
|
21 |
+
#region API Connectivity Issues Simulation
|
22 |
+
#--------------------------------------------------------------------------------
|
23 |
+
|
24 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
|
25 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
|
26 |
+
}
|
27 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
|
28 |
+
define( 'WP_FS__SIMULATE_NO_CURL', false );
|
29 |
+
}
|
30 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
|
31 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
|
32 |
+
}
|
33 |
+
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
|
34 |
+
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
|
35 |
+
}
|
36 |
+
if ( WP_FS__SIMULATE_NO_CURL ) {
|
37 |
+
define( 'FS_SDK__SIMULATE_NO_CURL', true );
|
38 |
+
}
|
39 |
+
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
|
40 |
+
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
|
41 |
+
}
|
42 |
+
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
|
43 |
+
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
|
44 |
+
}
|
45 |
+
|
46 |
+
#endregion
|
47 |
+
|
48 |
+
if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
|
49 |
+
define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
|
50 |
+
}
|
51 |
+
|
52 |
+
if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
|
53 |
+
/**
|
54 |
+
* @since 1.1.7.3
|
55 |
+
* @author Vova Feldman (@svovaf)
|
56 |
+
*
|
57 |
+
* I'm not sure if shared servers periodically change IP, or the subdomain of the
|
58 |
+
* admin dashboard. Also, I've seen sites that have strange loop of switching
|
59 |
+
* between domains on a daily basis. Therefore, to eliminate the risk of
|
60 |
+
* multiple unwanted connectivity test pings, temporary ignore domain or
|
61 |
+
* server IP changes.
|
62 |
+
*/
|
63 |
+
define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* If your dev environment supports custom public network IP setup
|
68 |
+
* like VVV, please update WP_FS__LOCALHOST_IP with your public IP
|
69 |
+
* and uncomment it during dev.
|
70 |
+
*/
|
71 |
+
if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
72 |
+
// VVV default public network IP.
|
73 |
+
define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
|
74 |
+
|
75 |
+
// define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
|
76 |
+
}
|
77 |
+
|
78 |
+
/**
|
79 |
+
* If true and running with secret key, the opt-in process
|
80 |
+
* will skip the email activation process which is invoked
|
81 |
+
* when the email of the context user already exist in Freemius
|
82 |
+
* database (as a security precaution, to prevent sharing user
|
83 |
+
* secret with unauthorized entity).
|
84 |
+
*
|
85 |
+
* IMPORTANT:
|
86 |
+
* AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
|
87 |
+
* THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
|
88 |
+
* CLOCK IS SYNCED.
|
89 |
+
*/
|
90 |
+
if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
|
91 |
+
define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
|
92 |
+
}
|
93 |
+
|
94 |
+
|
95 |
+
#--------------------------------------------------------------------------------
|
96 |
+
#region Directories
|
97 |
+
#--------------------------------------------------------------------------------
|
98 |
+
|
99 |
+
if ( ! defined( 'WP_FS__DIR' ) ) {
|
100 |
+
define( 'WP_FS__DIR', dirname( __FILE__ ) );
|
101 |
+
}
|
102 |
+
if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
|
103 |
+
define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
|
104 |
+
}
|
105 |
+
if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
|
106 |
+
define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
|
107 |
+
}
|
108 |
+
if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
|
109 |
+
define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
|
110 |
+
}
|
111 |
+
if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
|
112 |
+
define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
|
113 |
+
}
|
114 |
+
if ( ! defined( 'WP_FS__DIR_JS' ) ) {
|
115 |
+
define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
|
116 |
+
}
|
117 |
+
if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
|
118 |
+
define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
|
119 |
+
}
|
120 |
+
if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
|
121 |
+
define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
|
122 |
+
}
|
123 |
+
|
124 |
+
#endregion
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Domain / URL / Address
|
128 |
+
*/
|
129 |
+
define( 'WP_FS__ROOT_DOMAIN_PRODUCTION', 'freemius.com' );
|
130 |
+
define( 'WP_FS__DOMAIN_PRODUCTION', 'wp.freemius.com' );
|
131 |
+
define( 'WP_FS__ADDRESS_PRODUCTION', 'https://' . WP_FS__DOMAIN_PRODUCTION );
|
132 |
+
|
133 |
+
if ( ! defined( 'WP_FS__DOMAIN_LOCALHOST' ) ) {
|
134 |
+
define( 'WP_FS__DOMAIN_LOCALHOST', 'wp.freemius' );
|
135 |
+
}
|
136 |
+
if ( ! defined( 'WP_FS__ADDRESS_LOCALHOST' ) ) {
|
137 |
+
define( 'WP_FS__ADDRESS_LOCALHOST', 'http://' . WP_FS__DOMAIN_LOCALHOST . ':8080' );
|
138 |
+
}
|
139 |
+
|
140 |
+
if ( ! defined( 'WP_FS__TESTING_DOMAIN' ) ) {
|
141 |
+
define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
|
142 |
+
}
|
143 |
+
|
144 |
+
#--------------------------------------------------------------------------------
|
145 |
+
#region HTTP
|
146 |
+
#--------------------------------------------------------------------------------
|
147 |
+
|
148 |
+
if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
|
149 |
+
define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
|
150 |
+
}
|
151 |
+
|
152 |
+
if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
|
153 |
+
define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
|
154 |
+
// Checks if CloudFlare's HTTPS (Flexible SSL support).
|
155 |
+
isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
|
156 |
+
'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
|
157 |
+
) ||
|
158 |
+
// Check if HTTPS request.
|
159 |
+
( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
|
160 |
+
( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
|
161 |
+
);
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
|
165 |
+
define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
|
166 |
+
strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
|
167 |
+
}
|
168 |
+
|
169 |
+
if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
|
170 |
+
define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
|
171 |
+
}
|
172 |
+
|
173 |
+
if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
|
174 |
+
if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
175 |
+
define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
|
176 |
+
} else {
|
177 |
+
define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
|
178 |
+
is_string( WP_FS__REMOTE_ADDR ) &&
|
179 |
+
( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
|
180 |
+
WP_FS__REMOTE_ADDR === '::1' )
|
181 |
+
);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
|
186 |
+
define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
|
187 |
+
false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
|
188 |
+
}
|
189 |
+
|
190 |
+
#endregion
|
191 |
+
|
192 |
+
if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
|
193 |
+
// By default, run with Freemius production servers.
|
194 |
+
define( 'WP_FS__IS_PRODUCTION_MODE', true );
|
195 |
+
}
|
196 |
+
|
197 |
+
if ( ! defined( 'WP_FS__ADDRESS' ) ) {
|
198 |
+
define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
|
199 |
+
}
|
200 |
+
|
201 |
+
|
202 |
+
#--------------------------------------------------------------------------------
|
203 |
+
#region API
|
204 |
+
#--------------------------------------------------------------------------------
|
205 |
+
|
206 |
+
if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
|
207 |
+
define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius-local.com:8080' );
|
208 |
+
}
|
209 |
+
if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
|
210 |
+
define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
|
211 |
+
}
|
212 |
+
|
213 |
+
// Set API address for local testing.
|
214 |
+
if ( ! WP_FS__IS_PRODUCTION_MODE ) {
|
215 |
+
if ( ! defined( 'FS_API__ADDRESS' ) ) {
|
216 |
+
define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
|
217 |
+
}
|
218 |
+
if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
|
219 |
+
define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
|
220 |
+
}
|
221 |
+
}
|
222 |
+
|
223 |
+
#endregion
|
224 |
+
|
225 |
+
#--------------------------------------------------------------------------------
|
226 |
+
#region Checkout
|
227 |
+
#--------------------------------------------------------------------------------
|
228 |
+
|
229 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS_PRODUCTION' ) ) {
|
230 |
+
define( 'FS_CHECKOUT__ADDRESS_PRODUCTION', 'https://checkout.freemius.com' );
|
231 |
+
}
|
232 |
+
|
233 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS_LOCALHOST' ) ) {
|
234 |
+
define( 'FS_CHECKOUT__ADDRESS_LOCALHOST', 'http://checkout.freemius-local.com:8080' );
|
235 |
+
}
|
236 |
+
|
237 |
+
if ( ! defined( 'FS_CHECKOUT__ADDRESS' ) ) {
|
238 |
+
define( 'FS_CHECKOUT__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? FS_CHECKOUT__ADDRESS_PRODUCTION : FS_CHECKOUT__ADDRESS_LOCALHOST ) );
|
239 |
+
}
|
240 |
+
|
241 |
+
#endregion
|
242 |
+
|
243 |
+
define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
|
244 |
+
|
245 |
+
if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
|
246 |
+
define( 'WP_FS__ACCOUNTS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'accounts' );
|
247 |
+
}
|
248 |
+
if ( ! defined( 'WP_FS__API_CACHE_OPTION_NAME' ) ) {
|
249 |
+
define( 'WP_FS__API_CACHE_OPTION_NAME', WP_FS___OPTION_PREFIX . 'api_cache' );
|
250 |
+
}
|
251 |
+
if ( ! defined( 'WP_FS__GDPR_OPTION_NAME' ) ) {
|
252 |
+
define( 'WP_FS__GDPR_OPTION_NAME', WP_FS___OPTION_PREFIX . 'gdpr' );
|
253 |
+
}
|
254 |
+
define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
|
255 |
+
|
256 |
+
/**
|
257 |
+
* Module types
|
258 |
+
*
|
259 |
+
* @since 1.2.2
|
260 |
+
*/
|
261 |
+
define( 'WP_FS__MODULE_TYPE_PLUGIN', 'plugin' );
|
262 |
+
define( 'WP_FS__MODULE_TYPE_THEME', 'theme' );
|
263 |
+
|
264 |
+
/**
|
265 |
+
* Billing Frequencies
|
266 |
+
*/
|
267 |
+
define( 'WP_FS__PERIOD_ANNUALLY', 'annual' );
|
268 |
+
define( 'WP_FS__PERIOD_MONTHLY', 'monthly' );
|
269 |
+
define( 'WP_FS__PERIOD_LIFETIME', 'lifetime' );
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Plans
|
273 |
+
*/
|
274 |
+
define( 'WP_FS__PLAN_DEFAULT_PAID', false );
|
275 |
+
define( 'WP_FS__PLAN_FREE', 'free' );
|
276 |
+
define( 'WP_FS__PLAN_TRIAL', 'trial' );
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Times in seconds
|
280 |
+
*/
|
281 |
+
if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
|
282 |
+
define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
|
283 |
+
}
|
284 |
+
if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
|
285 |
+
define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
|
286 |
+
}
|
287 |
+
// define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
|
288 |
+
if ( ! defined( 'WP_FS__TIME_12_HOURS_IN_SEC' ) ) {
|
289 |
+
define( 'WP_FS__TIME_12_HOURS_IN_SEC', 43200 );
|
290 |
+
}
|
291 |
+
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
292 |
+
define( 'WP_FS__TIME_24_HOURS_IN_SEC', WP_FS__TIME_12_HOURS_IN_SEC * 2 );
|
293 |
+
}
|
294 |
+
if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
|
295 |
+
define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
|
296 |
+
}
|
297 |
+
|
298 |
+
#--------------------------------------------------------------------------------
|
299 |
+
#region Debugging
|
300 |
+
#--------------------------------------------------------------------------------
|
301 |
+
|
302 |
+
if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
|
303 |
+
$debug_mode = get_option( 'fs_debug_mode', null );
|
304 |
+
|
305 |
+
if ( $debug_mode === null ) {
|
306 |
+
$debug_mode = false;
|
307 |
+
add_option( 'fs_debug_mode', $debug_mode );
|
308 |
+
}
|
309 |
+
|
310 |
+
define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
|
311 |
+
}
|
312 |
+
|
313 |
+
if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
|
314 |
+
define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
|
315 |
+
}
|
316 |
+
if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
|
317 |
+
define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
|
318 |
+
}
|
319 |
+
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
320 |
+
define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
|
321 |
+
}
|
322 |
+
|
323 |
+
if ( WP_FS__ECHO_DEBUG_SDK ) {
|
324 |
+
error_reporting( E_ALL );
|
325 |
+
}
|
326 |
+
|
327 |
+
#endregion
|
328 |
+
|
329 |
+
if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
|
330 |
+
define( 'WP_FS__SCRIPT_START_TIME', time() );
|
331 |
+
}
|
332 |
+
if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
|
333 |
+
define( 'WP_FS__DEFAULT_PRIORITY', 10 );
|
334 |
+
}
|
335 |
+
if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
|
336 |
+
define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
|
337 |
+
}
|
338 |
+
|
339 |
+
#--------------------------------------------------------------------------------
|
340 |
+
#region Multisite Network
|
341 |
+
#--------------------------------------------------------------------------------
|
342 |
+
|
343 |
+
/**
|
344 |
+
* Do not use this define directly, it will have the wrong value
|
345 |
+
* during plugin uninstall/deletion when the inclusion of the plugin
|
346 |
+
* is triggered due to registration with register_uninstall_hook().
|
347 |
+
*
|
348 |
+
* Instead, use fs_is_network_admin().
|
349 |
+
*
|
350 |
+
* @author Vova Feldman (@svovaf)
|
351 |
+
*/
|
352 |
+
if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
|
353 |
+
define( 'WP_FS__IS_NETWORK_ADMIN',
|
354 |
+
is_multisite() &&
|
355 |
+
( is_network_admin() ||
|
356 |
+
( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
|
357 |
+
( isset( $_REQUEST['_fs_network_admin'] ) /*||
|
358 |
+
( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
|
359 |
+
) ||
|
360 |
+
// Plugin uninstall.
|
361 |
+
defined( 'WP_UNINSTALL_PLUGIN' ) )
|
362 |
+
)
|
363 |
+
);
|
364 |
+
}
|
365 |
+
|
366 |
+
/**
|
367 |
+
* Do not use this define directly, it will have the wrong value
|
368 |
+
* during plugin uninstall/deletion when the inclusion of the plugin
|
369 |
+
* is triggered due to registration with register_uninstall_hook().
|
370 |
+
*
|
371 |
+
* Instead, use fs_is_blog_admin().
|
372 |
+
*
|
373 |
+
* @author Vova Feldman (@svovaf)
|
374 |
+
*/
|
375 |
+
if ( ! defined( 'WP_FS__IS_BLOG_ADMIN' ) ) {
|
376 |
+
define( 'WP_FS__IS_BLOG_ADMIN', is_blog_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['_fs_blog_admin'] ) ) );
|
377 |
+
}
|
378 |
+
|
379 |
+
if ( ! defined( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED' ) ) {
|
380 |
+
// Set to true to show network level settings even if delegated to site admins.
|
381 |
+
define( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED', false );
|
382 |
+
}
|
383 |
+
|
384 |
+
#endregion
|
385 |
+
|
386 |
+
if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
|
387 |
+
define( 'WP_FS__DEMO_MODE', false );
|
388 |
+
}
|
389 |
+
if ( ! defined( 'FS_SDK__SSLVERIFY' ) ) {
|
390 |
+
define( 'FS_SDK__SSLVERIFY', false );
|
391 |
+
}
|
freemius/includes/class-freemius-abstract.php
ADDED
@@ -0,0 +1,597 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* @package Freemius
|
4 |
+
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
+
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
+
* @since 1.0.7
|
7 |
+
*/
|
8 |
+
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
|
14 |
+
/**
|
15 |
+
* - Each instance of Freemius class represents a single plugin
|
16 |
+
* install by a single user (the installer of the plugin).
|
17 |
+
*
|
18 |
+
* - Each website can only have one install of the same plugin.
|
19 |
+
*
|
20 |
+
* - Install entity is only created after a user connects his account with Freemius.
|
21 |
+
*
|
22 |
+
* Class Freemius_Abstract
|
23 |
+
*/
|
24 |
+
abstract class Freemius_Abstract {
|
25 |
+
|
26 |
+
#----------------------------------------------------------------------------------
|
27 |
+
#region Identity
|
28 |
+
#----------------------------------------------------------------------------------
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Check if user has connected his account (opted-in).
|
32 |
+
*
|
33 |
+
* Note:
|
34 |
+
* If the user opted-in and opted-out on a later stage,
|
35 |
+
* this will still return true. If you want to check if the
|
36 |
+
* user is currently opted-in, use:
|
37 |
+
* `$fs->is_registered() && $fs->is_tracking_allowed()`
|
38 |
+
*
|
39 |
+
* @since 1.0.1
|
40 |
+
* @return bool
|
41 |
+
*/
|
42 |
+
abstract function is_registered();
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Check if the user skipped connecting the account with Freemius.
|
46 |
+
*
|
47 |
+
* @since 1.0.7
|
48 |
+
*
|
49 |
+
* @return bool
|
50 |
+
*/
|
51 |
+
abstract function is_anonymous();
|
52 |
+
|
53 |
+
/**
|
54 |
+
* Check if the user currently in activation mode.
|
55 |
+
*
|
56 |
+
* @since 1.0.7
|
57 |
+
*
|
58 |
+
* @return bool
|
59 |
+
*/
|
60 |
+
abstract function is_activation_mode();
|
61 |
+
|
62 |
+
#endregion
|
63 |
+
|
64 |
+
#----------------------------------------------------------------------------------
|
65 |
+
#region Usage Tracking
|
66 |
+
#----------------------------------------------------------------------------------
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Returns TRUE if the user opted-in and didn't disconnect (opt-out).
|
70 |
+
*
|
71 |
+
* @author Leo Fajardo (@leorw)
|
72 |
+
* @since 1.2.1.5
|
73 |
+
*
|
74 |
+
* @return bool
|
75 |
+
*/
|
76 |
+
abstract function is_tracking_allowed();
|
77 |
+
|
78 |
+
/**
|
79 |
+
* Returns TRUE if the user never opted-in or manually opted-out.
|
80 |
+
*
|
81 |
+
* @author Vova Feldman (@svovaf)
|
82 |
+
* @since 1.2.1.5
|
83 |
+
*
|
84 |
+
* @return bool
|
85 |
+
*/
|
86 |
+
function is_tracking_prohibited() {
|
87 |
+
return ! $this->is_registered() || ! $this->is_tracking_allowed();
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Opt-out from usage tracking.
|
92 |
+
*
|
93 |
+
* Note: This will not delete the account information but will stop all tracking.
|
94 |
+
*
|
95 |
+
* Returns:
|
96 |
+
* 1. FALSE - If the user never opted-in.
|
97 |
+
* 2. TRUE - If successfully opted-out.
|
98 |
+
* 3. object - API Result on failure.
|
99 |
+
*
|
100 |
+
* @author Leo Fajardo (@leorw)
|
101 |
+
* @since 1.2.1.5
|
102 |
+
*
|
103 |
+
* @return bool|object
|
104 |
+
*/
|
105 |
+
abstract function stop_tracking();
|
106 |
+
|
107 |
+
/**
|
108 |
+
* Opt-in back into usage tracking.
|
109 |
+
*
|
110 |
+
* Note: This will only work if the user opted-in previously.
|
111 |
+
*
|
112 |
+
* Returns:
|
113 |
+
* 1. FALSE - If the user never opted-in.
|
114 |
+
* 2. TRUE - If successfully opted-in back to usage tracking.
|
115 |
+
* 3. object - API result on failure.
|
116 |
+
*
|
117 |
+
* @author Leo Fajardo (@leorw)
|
118 |
+
* @since 1.2.1.5
|
119 |
+
*
|
120 |
+
* @return bool|object
|
121 |
+
*/
|
122 |
+
abstract function allow_tracking();
|
123 |
+
|
124 |
+
#endregion
|
125 |
+
|
126 |
+
#----------------------------------------------------------------------------------
|
127 |
+
#region Module Type
|
128 |
+
#----------------------------------------------------------------------------------
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Checks if the plugin's type is "plugin". The other type is "theme".
|
132 |
+
*
|
133 |
+
* @author Leo Fajardo (@leorw)
|
134 |
+
* @since 1.2.2
|
135 |
+
*
|
136 |
+
* @return bool
|
137 |
+
*/
|
138 |
+
abstract function is_plugin();
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Checks if the module type is "theme". The other type is "plugin".
|
142 |
+
*
|
143 |
+
* @author Leo Fajardo (@leorw)
|
144 |
+
* @since 1.2.2
|
145 |
+
*
|
146 |
+
* @return bool
|
147 |
+
*/
|
148 |
+
function is_theme() {
|
149 |
+
return ( ! $this->is_plugin() );
|
150 |
+
}
|
151 |
+
|
152 |
+
#endregion
|
153 |
+
|
154 |
+
#----------------------------------------------------------------------------------
|
155 |
+
#region Permissions
|
156 |
+
#----------------------------------------------------------------------------------
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Check if plugin must be WordPress.org compliant.
|
160 |
+
*
|
161 |
+
* @since 1.0.7
|
162 |
+
*
|
163 |
+
* @return bool
|
164 |
+
*/
|
165 |
+
abstract function is_org_repo_compliant();
|
166 |
+
|
167 |
+
/**
|
168 |
+
* Check if plugin is allowed to install executable files.
|
169 |
+
*
|
170 |
+
* @author Vova Feldman (@svovaf)
|
171 |
+
* @since 1.0.5
|
172 |
+
*
|
173 |
+
* @return bool
|
174 |
+
*/
|
175 |
+
function is_allowed_to_install() {
|
176 |
+
return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
|
177 |
+
}
|
178 |
+
|
179 |
+
#endregion
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Check if user in trial or in free plan (not paying).
|
183 |
+
*
|
184 |
+
* @author Vova Feldman (@svovaf)
|
185 |
+
* @since 1.0.4
|
186 |
+
*
|
187 |
+
* @return bool
|
188 |
+
*/
|
189 |
+
function is_not_paying() {
|
190 |
+
return ( $this->is_trial() || $this->is_free_plan() );
|
191 |
+
}
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Check if the user has an activated and valid paid license on current plugin's install.
|
195 |
+
*
|
196 |
+
* @since 1.0.9
|
197 |
+
*
|
198 |
+
* @return bool
|
199 |
+
*/
|
200 |
+
abstract function is_paying();
|
201 |
+
|
202 |
+
/**
|
203 |
+
* Check if the user is paying or in trial.
|
204 |
+
*
|
205 |
+
* @since 1.0.9
|
206 |
+
*
|
207 |
+
* @return bool
|
208 |
+
*/
|
209 |
+
function is_paying_or_trial() {
|
210 |
+
return ( $this->is_paying() || $this->is_trial() );
|
211 |
+
}
|
212 |
+
|
213 |
+
/**
|
214 |
+
* Check if user in a trial or have feature enabled license.
|
215 |
+
*
|
216 |
+
* @author Vova Feldman (@svovaf)
|
217 |
+
* @since 1.1.7
|
218 |
+
*
|
219 |
+
* @return bool
|
220 |
+
*/
|
221 |
+
abstract function can_use_premium_code();
|
222 |
+
|
223 |
+
#----------------------------------------------------------------------------------
|
224 |
+
#region Premium Only
|
225 |
+
#----------------------------------------------------------------------------------
|
226 |
+
|
227 |
+
/**
|
228 |
+
* All logic wrapped in methods with "__premium_only()" suffix will be only
|
229 |
+
* included in the premium code.
|
230 |
+
*
|
231 |
+
* Example:
|
232 |
+
* if ( freemius()->is__premium_only() ) {
|
233 |
+
* ...
|
234 |
+
* }
|
235 |
+
*/
|
236 |
+
|
237 |
+
/**
|
238 |
+
* Returns true when running premium plugin code.
|
239 |
+
*
|
240 |
+
* @since 1.0.9
|
241 |
+
*
|
242 |
+
* @return bool
|
243 |
+
*/
|
244 |
+
function is__premium_only() {
|
245 |
+
return $this->is_premium();
|
246 |
+
}
|
247 |
+
|
248 |
+
/**
|
249 |
+
* Check if the user has an activated and valid paid license on current plugin's install.
|
250 |
+
*
|
251 |
+
* @since 1.0.9
|
252 |
+
*
|
253 |
+
* @return bool
|
254 |
+
*
|
255 |
+
*/
|
256 |
+
function is_paying__premium_only() {
|
257 |
+
return ( $this->is__premium_only() && $this->is_paying() );
|
258 |
+
}
|
259 |
+
|
260 |
+
/**
|
261 |
+
* All code wrapped in this statement will be only included in the premium code.
|
262 |
+
*
|
263 |
+
* @since 1.0.9
|
264 |
+
*
|
265 |
+
* @param string $plan Plan name.
|
266 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
267 |
+
*
|
268 |
+
* @return bool
|
269 |
+
*/
|
270 |
+
function is_plan__premium_only( $plan, $exact = false ) {
|
271 |
+
return ( $this->is_premium() && $this->is_plan( $plan, $exact ) );
|
272 |
+
}
|
273 |
+
|
274 |
+
/**
|
275 |
+
* Check if plan matches active license' plan or active trial license' plan.
|
276 |
+
*
|
277 |
+
* All code wrapped in this statement will be only included in the premium code.
|
278 |
+
*
|
279 |
+
* @since 1.0.9
|
280 |
+
*
|
281 |
+
* @param string $plan Plan name.
|
282 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
283 |
+
*
|
284 |
+
* @return bool
|
285 |
+
*/
|
286 |
+
function is_plan_or_trial__premium_only( $plan, $exact = false ) {
|
287 |
+
return ( $this->is_premium() && $this->is_plan_or_trial( $plan, $exact ) );
|
288 |
+
}
|
289 |
+
|
290 |
+
/**
|
291 |
+
* Check if the user is paying or in trial.
|
292 |
+
*
|
293 |
+
* All code wrapped in this statement will be only included in the premium code.
|
294 |
+
*
|
295 |
+
* @since 1.0.9
|
296 |
+
*
|
297 |
+
* @return bool
|
298 |
+
*/
|
299 |
+
function is_paying_or_trial__premium_only() {
|
300 |
+
return $this->is_premium() && $this->is_paying_or_trial();
|
301 |
+
}
|
302 |
+
|
303 |
+
/**
|
304 |
+
* Check if the user has an activated and valid paid license on current plugin's install.
|
305 |
+
*
|
306 |
+
* @since 1.0.4
|
307 |
+
*
|
308 |
+
* @return bool
|
309 |
+
*
|
310 |
+
* @deprecated Method name is confusing since it's not clear from the name the code will be removed.
|
311 |
+
* @using Alias to is_paying__premium_only()
|
312 |
+
*/
|
313 |
+
function is_paying__fs__() {
|
314 |
+
return $this->is_paying__premium_only();
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
* Check if user in a trial or have feature enabled license.
|
319 |
+
*
|
320 |
+
* All code wrapped in this statement will be only included in the premium code.
|
321 |
+
*
|
322 |
+
* @author Vova Feldman (@svovaf)
|
323 |
+
* @since 1.1.9
|
324 |
+
*
|
325 |
+
* @return bool
|
326 |
+
*/
|
327 |
+
function can_use_premium_code__premium_only() {
|
328 |
+
return $this->is_premium() && $this->can_use_premium_code();
|
329 |
+
}
|
330 |
+
|
331 |
+
#endregion
|
332 |
+
|
333 |
+
#----------------------------------------------------------------------------------
|
334 |
+
#region Trial
|
335 |
+
#----------------------------------------------------------------------------------
|
336 |
+
|
337 |
+
/**
|
338 |
+
* Check if the user in a trial.
|
339 |
+
*
|
340 |
+
* @since 1.0.3
|
341 |
+
*
|
342 |
+
* @return bool
|
343 |
+
*/
|
344 |
+
abstract function is_trial();
|
345 |
+
|
346 |
+
/**
|
347 |
+
* Check if trial already utilized.
|
348 |
+
*
|
349 |
+
* @since 1.0.9
|
350 |
+
*
|
351 |
+
* @return bool
|
352 |
+
*/
|
353 |
+
abstract function is_trial_utilized();
|
354 |
+
|
355 |
+
#endregion
|
356 |
+
|
357 |
+
#----------------------------------------------------------------------------------
|
358 |
+
#region Plans
|
359 |
+
#----------------------------------------------------------------------------------
|
360 |
+
|
361 |
+
/**
|
362 |
+
* Check if the user is on the free plan of the product.
|
363 |
+
*
|
364 |
+
* @since 1.0.4
|
365 |
+
*
|
366 |
+
* @return bool
|
367 |
+
*/
|
368 |
+
abstract function is_free_plan();
|
369 |
+
|
370 |
+
/**
|
371 |
+
* @since 1.0.2
|
372 |
+
*
|
373 |
+
* @param string $plan Plan name.
|
374 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
375 |
+
*
|
376 |
+
* @return bool
|
377 |
+
*/
|
378 |
+
abstract function is_plan( $plan, $exact = false );
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Check if plan based on trial. If not in trial mode, should return false.
|
382 |
+
*
|
383 |
+
* @since 1.0.9
|
384 |
+
*
|
385 |
+
* @param string $plan Plan name.
|
386 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
387 |
+
*
|
388 |
+
* @return bool
|
389 |
+
*/
|
390 |
+
abstract function is_trial_plan( $plan, $exact = false );
|
391 |
+
|
392 |
+
/**
|
393 |
+
* Check if plan matches active license' plan or active trial license' plan.
|
394 |
+
*
|
395 |
+
* @since 1.0.9
|
396 |
+
*
|
397 |
+
* @param string $plan Plan name.
|
398 |
+
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
399 |
+
*
|
400 |
+
* @return bool
|
401 |
+
*/
|
402 |
+
function is_plan_or_trial( $plan, $exact = false ) {
|
403 |
+
return $this->is_plan( $plan, $exact ) ||
|
404 |
+
$this->is_trial_plan( $plan, $exact );
|
405 |
+
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Check if plugin has any paid plans.
|
409 |
+
*
|
410 |
+
* @author Vova Feldman (@svovaf)
|
411 |
+
* @since 1.0.7
|
412 |
+
*
|
413 |
+
* @return bool
|
414 |
+
*/
|
415 |
+
abstract function has_paid_plan();
|
416 |
+
|
417 |
+
/**
|
418 |
+
* Check if plugin has any free plan, or is it premium only.
|
419 |
+
*
|
420 |
+
* Note: If no plans configured, assume plugin is free.
|
421 |
+
*
|
422 |
+
* @author Vova Feldman (@svovaf)
|
423 |
+
* @since 1.0.7
|
424 |
+
*
|
425 |
+
* @return bool
|
426 |
+
*/
|
427 |
+
abstract function has_free_plan();
|
428 |
+
|
429 |
+
/**
|
430 |
+
* Check if plugin is premium only (no free plans).
|
431 |
+
*
|
432 |
+
* NOTE: is__premium_only() is very different method, don't get confused.
|
433 |
+
*
|
434 |
+
* @author Vova Feldman (@svovaf)
|
435 |
+
* @since 1.1.9
|
436 |
+
*
|
437 |
+
* @return bool
|
438 |
+
*/
|
439 |
+
abstract function is_only_premium();
|
440 |
+
|
441 |
+
/**
|
442 |
+
* Check if module has a premium code version.
|
443 |
+
*
|
444 |
+
* Serviceware module might be freemium without any
|
445 |
+
* premium code version, where the paid features
|
446 |
+
* are all part of the service.
|
447 |
+
*
|
448 |
+
* @author Vova Feldman (@svovaf)
|
449 |
+
* @since 1.2.1.6
|
450 |
+
*
|
451 |
+
* @return bool
|
452 |
+
*/
|
453 |
+
abstract function has_premium_version();
|
454 |
+
|
455 |
+
/**
|
456 |
+
* Check if module has any release on Freemius,
|
457 |
+
* or all plugin's code is on WordPress.org (Serviceware).
|
458 |
+
*
|
459 |
+
* @return bool
|
460 |
+
*/
|
461 |
+
function has_release_on_freemius() {
|
462 |
+
return ! $this->is_org_repo_compliant() ||
|
463 |
+
$this->has_premium_version();
|
464 |
+
}
|
465 |
+
|
466 |
+
/**
|
467 |
+
* Checks if it's a freemium plugin.
|
468 |
+
*
|
469 |
+
* @author Vova Feldman (@svovaf)
|
470 |
+
* @since 1.1.9
|
471 |
+
*
|
472 |
+
* @return bool
|
473 |
+
*/
|
474 |
+
function is_freemium() {
|
475 |
+
return $this->has_paid_plan() &&
|
476 |
+
$this->has_free_plan();
|
477 |
+
}
|
478 |
+
|
479 |
+
/**
|
480 |
+
* Check if module has only one plan.
|
481 |
+
*
|
482 |
+
* @author Vova Feldman (@svovaf)
|
483 |
+
* @since 1.2.1.7
|
484 |
+
*
|
485 |
+
* @return bool
|
486 |
+
*/
|
487 |
+
abstract function is_single_plan();
|
488 |
+
|
489 |
+
#endregion
|
490 |
+
|
491 |
+
/**
|
492 |
+
* Check if running payments in sandbox mode.
|
493 |
+
*
|
494 |
+
* @since 1.0.4
|
495 |
+
*
|
496 |
+
* @return bool
|
497 |
+
*/
|
498 |
+
abstract function is_payments_sandbox();
|
499 |
+
|
500 |
+
/**
|
501 |
+
* Check if running test vs. live plugin.
|
502 |
+
*
|
503 |
+
* @since 1.0.5
|
504 |
+
*
|
505 |
+
* @return bool
|
506 |
+
*/
|
507 |
+
abstract function is_live();
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Check if running premium plugin code.
|
511 |
+
*
|
512 |
+
* @since 1.0.5
|
513 |
+
*
|
514 |
+
* @return bool
|
515 |
+
*/
|
516 |
+
abstract function is_premium();
|
517 |
+
|
518 |
+
/**
|
519 |
+
* Get upgrade URL.
|
520 |
+
*
|
521 |
+
* @author Vova Feldman (@svovaf)
|
522 |
+
* @since 1.0.2
|
523 |
+
*
|
524 |
+
* @param string $period Billing cycle.
|
525 |
+
*
|
526 |
+
* @return string
|
527 |
+
*/
|
528 |
+
abstract function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY );
|
529 |
+
|
530 |
+
/**
|
531 |
+
* Check if Freemius was first added in a plugin update.
|
532 |
+
*
|
533 |
+
* @author Vova Feldman (@svovaf)
|
534 |
+
* @since 1.1.5
|
535 |
+
*
|
536 |
+
* @return bool
|
537 |
+
*/
|
538 |
+
function is_plugin_update() {
|
539 |
+
return ! $this->is_plugin_new_install();
|
540 |
+
}
|
541 |
+
|
542 |
+
/**
|
543 |
+
* Check if Freemius was part of the plugin when the user installed it first.
|
544 |
+
*
|
545 |
+
* @author Vova Feldman (@svovaf)
|
546 |
+
* @since 1.1.5
|
547 |
+
*
|
548 |
+
* @return bool
|
549 |
+
*/
|
550 |
+
abstract function is_plugin_new_install();
|
551 |
+
|
552 |
+
#----------------------------------------------------------------------------------
|
553 |
+
#region Marketing
|
554 |
+
#----------------------------------------------------------------------------------
|
555 |
+
|
556 |
+
/**
|
557 |
+
* Check if current user purchased any other plugins before.
|
558 |
+
*
|
559 |
+
* @author Vova Feldman (@svovaf)
|
560 |
+
* @since 1.0.9
|
561 |
+
*
|
562 |
+
* @return bool
|
563 |
+
*/
|
564 |
+
abstract function has_purchased_before();
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Check if current user classified as an agency.
|
568 |
+
*
|
569 |
+
* @author Vova Feldman (@svovaf)
|
570 |
+
* @since 1.0.9
|
571 |
+
*
|
572 |
+
* @return bool
|
573 |
+
*/
|
574 |
+
abstract function is_agency();
|
575 |
+
|
576 |
+
/**
|
577 |
+
* Check if current user classified as a developer.
|
578 |
+
*
|
579 |
+
* @author Vova Feldman (@svovaf)
|
580 |
+
* @since 1.0.9
|
581 |
+
*
|
582 |
+
* @return bool
|
583 |
+
*/
|
584 |
+
abstract function is_developer();
|
585 |
+
|
586 |
+
/**
|
587 |
+
* Check if current user classified as a business.
|
588 |
+
*
|
589 |
+
* @author Vova Feldman (@svovaf)
|
590 |
+
* @since 1.0.9
|
591 |
+
*
|
592 |
+
* @return bool
|
593 |
+
*/
|
594 |
+
abstract function is_business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.0.3
|
7 |
+
*/
|
8 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
+
exit;
|
10 |
+
}
|
11 |
+
|
12 |
+
// "final class"
|
13 |
+
class Freemius extends Freemius_Abstract {
|
14 |
+
/**
|
15 |
+
* SDK Version
|
16 |
+
*
|
17 |
+
* @var string
|
18 |
+
*/
|
19 |
+
public $version = WP_FS__SDK_VERSION;
|
20 |
+
|
21 |
+
#region Plugin Info
|
22 |
+
|
23 |
+
/**
|
24 |
+
* @since 1.0.1
|
25 |
+
*
|
26 |
+
* @var string
|
27 |
+
*/
|
28 |
+
private $_slug;
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @since 1.0.0
|
32 |
+
*
|
33 |
+
* @var string
|
34 |
+
*/
|
35 |
+
private $_plugin_basename;
|
36 |
+
/**
|
37 |
+
* @since 2.2.1
|
38 |
+
*
|
39 |
+
* @var string
|
40 |
+
*/
|
41 |
+
private $_premium_plugin_basename;
|
42 |
+
/**
|
43 |
+
* @since 1.0.0
|
44 |
+
*
|
45 |
+
* @var string
|
46 |
+
*/
|
47 |
+
private $_free_plugin_basename;
|
48 |
+
/**
|
49 |
+
* @since 1.0.0
|
50 |
+
*
|
51 |
+
* @var string
|
52 |
+
*/
|
53 |
+
private $_plugin_dir_path;
|
54 |
+
/**
|
55 |
+
* @since 1.0.0
|
56 |
+
*
|
57 |
+
* @var string
|
58 |
+
*/
|
59 |
+
private $_plugin_dir_name;
|
60 |
+
/**
|
61 |
+
* @since 1.0.0
|
62 |
+
*
|
63 |
+
* @var string
|
64 |
+
*/
|
65 |
+
private $_plugin_main_file_path;
|
66 |
+
/**
|
67 |
+
* @var string[]
|
68 |
+
*/
|
69 |
+
private $_plugin_data;
|
70 |
+
/**
|
71 |
+
* @since 1.0.9
|
72 |
+
*
|
73 |
+
* @var string
|
74 |
+
*/
|
75 |
+
private $_plugin_name;
|
76 |
+
/**
|
77 |
+
* @since 1.2.2
|
78 |
+
*
|
79 |
+
* @var string
|
80 |
+
*/
|
81 |
+
private $_module_type;
|
82 |
+
|
83 |
+
#endregion Plugin Info
|
84 |
+
|
85 |
+
/**
|
86 |
+
* @since 1.0.9
|
87 |
+
*
|
88 |
+
* @var bool If false, don't turn Freemius on.
|
89 |
+
*/
|
90 |
+
private $_is_on;
|
91 |
+
|
92 |
+
/**
|
93 |
+
* @since 1.1.3
|
94 |
+
*
|
95 |
+
* @var bool If false, don't turn Freemius on.
|
96 |
+
*/
|
97 |
+
private $_is_anonymous;
|
98 |
+
|
99 |
+
/**
|
100 |
+
* @since 1.0.9
|
101 |
+
* @var bool If false, issues with connectivity to Freemius API.
|
102 |
+
*/
|
103 |
+
private $_has_api_connection;
|
104 |
+
|
105 |
+
/**
|
106 |
+
* @since 1.0.9
|
107 |
+
* @since 2.0.0 Default to true since we need the property during the instance construction, prior to the dynamic_init() execution.
|
108 |
+
* @var bool Hints the SDK if plugin can support anonymous mode (if skip connect is visible).
|
109 |
+
*/
|
110 |
+
private $_enable_anonymous = true;
|
111 |
+
|
112 |
+
/**
|
113 |
+
* @since 1.1.7.5
|
114 |
+
* @var bool Hints the SDK if plugin should run in anonymous mode (only adds feedback form).
|
115 |
+
*/
|
116 |
+
private $_anonymous_mode;
|
117 |
+
|
118 |
+
/**
|
119 |
+
* @since 1.1.9
|
120 |
+
* @var bool Hints the SDK if plugin have any free plans.
|
121 |
+
*/
|
122 |
+
private $_is_premium_only;
|
123 |
+
|
124 |
+
/**
|
125 |
+
* @since 1.2.1.6
|
126 |
+
* @var bool Hints the SDK if plugin have premium code version at all.
|
127 |
+
*/
|
128 |
+
private $_has_premium_version;
|
129 |
+
|
130 |
+
/**
|
131 |
+
* @since 1.2.1.6
|
132 |
+
* @var bool Hints the SDK if plugin should ignore pending mode by simulating a skip.
|
133 |
+
*/
|
134 |
+
private $_ignore_pending_mode;
|
135 |
+
|
136 |
+
/**
|
137 |
+
* @since 1.0.8
|
138 |
+
* @var bool Hints the SDK if the plugin has any paid plans.
|
139 |
+
*/
|
140 |
+
private $_has_paid_plans;
|
141 |
+
|
142 |
+
/**
|
143 |
+
* @since 1.2.1.5
|
144 |
+
* @var int Hints the SDK if the plugin offers a trial period. If negative, no trial, if zero - has a trial but
|
145 |
+
* without a specified period, if positive - the number of trial days.
|
146 |
+
*/
|
147 |
+
private $_trial_days = - 1;
|
148 |
+
|
149 |
+
/**
|
150 |
+
* @since 1.2.1.5
|
151 |
+
* @var bool Hints the SDK if the trial requires a payment method or not.
|
152 |
+
*/
|
153 |
+
private $_is_trial_require_payment = false;
|
154 |
+
|
155 |
+
/**
|
156 |
+
* @since 1.0.7
|
157 |
+
* @var bool Hints the SDK if the plugin is WordPress.org compliant.
|
158 |
+
*/
|
159 |
+
private $_is_org_compliant;
|
160 |
+
|
161 |
+
/**
|
162 |
+
* @since 1.0.7
|
163 |
+
* @var bool Hints the SDK if the plugin is has add-ons.
|
164 |
+
*/
|
165 |
+
private $_has_addons;
|
166 |
+
|
167 |
+
/**
|
168 |
+
* @since 2.4.5
|
169 |
+
* @var string Navigation type: 'menu' or 'tabs'.
|
170 |
+
*/
|
171 |
+
private $_navigation;
|
172 |
+
|
173 |
+
const NAVIGATION_MENU = 'menu';
|
174 |
+
const NAVIGATION_TABS = 'tabs';
|
175 |
+
|
176 |
+
/**
|
177 |
+
* @since 1.1.6
|
178 |
+
* @var string[]bool.
|
179 |
+
*/
|
180 |
+
private $_permissions;
|
181 |
+
|
182 |
+
/**
|
183 |
+
* @var FS_Storage
|
184 |
+
*/
|
185 |
+
private $_storage;
|
186 |
+
|
187 |
+
/**
|
188 |
+
* @since 1.2.2.7
|
189 |
+
* @var FS_Cache_Manager
|
190 |
+
*/
|
191 |
+
private $_cache;
|
192 |
+
|
193 |
+
/**
|
194 |
+
* @since 1.0.0
|
195 |
+
*
|
196 |
+
* @var FS_Logger
|
197 |
+
*/
|
198 |
+
private $_logger;
|
199 |
+
/**
|
200 |
+
* @since 1.0.4
|
201 |
+
*
|
202 |
+
* @var FS_Plugin
|
203 |
+
*/
|
204 |
+
private $_plugin = false;
|
205 |
+
/**
|
206 |
+
* @since 1.0.4
|
207 |
+
*
|
208 |
+
* @var FS_Plugin|false
|
209 |
+
*/
|
210 |
+
private $_parent_plugin = false;
|
211 |
+
/**
|
212 |
+
* @since 1.1.1
|
213 |
+
*
|
214 |
+
* @var Freemius
|
215 |
+
*/
|
216 |
+
private $_parent = false;
|
217 |
+
/**
|
218 |
+
* @since 1.0.1
|
219 |
+
*
|
220 |
+
* @var FS_User
|
221 |
+
*/
|
222 |
+
private $_user = false;
|
223 |
+
/**
|
224 |
+
* @since 1.0.1
|
225 |
+
*
|
226 |
+
* @var FS_Site
|
227 |
+
*/
|
228 |
+
private $_site = false;
|
229 |
+
/**
|
230 |
+
* @since 1.0.1
|
231 |
+
*
|
232 |
+
* @var FS_Plugin_License
|
233 |
+
*/
|
234 |
+
private $_license;
|
235 |
+
/**
|
236 |
+
* @since 1.0.2
|
237 |
+
*
|
238 |
+
* @var FS_Plugin_Plan[]
|
239 |
+
*/
|
240 |
+
private $_plans = false;
|
241 |
+
/**
|
242 |
+
* @var FS_Plugin_License[]
|
243 |
+
* @since 1.0.5
|
244 |
+
*/
|
245 |
+
private $_licenses = false;
|
246 |
+
|
247 |
+
/**
|
248 |
+
* @since 1.0.1
|
249 |
+
*
|
250 |
+
* @var FS_Admin_Menu_Manager
|
251 |
+
*/
|
252 |
+
private $_menu;
|
253 |
+
|
254 |
+
/**
|
255 |
+
* @var FS_Admin_Notices
|
256 |
+
*/
|
257 |
+
private $_admin_notices;
|
258 |
+
|
259 |
+
/**
|
260 |
+
* @since 1.1.6
|
261 |
+
*
|
262 |
+
* @var FS_Admin_Notices
|
263 |
+
*/
|
264 |
+
private static $_global_admin_notices;
|
265 |
+
|
266 |
+
/**
|
267 |
+
* @var FS_Logger
|
268 |
+
* @since 1.0.0
|
269 |
+
*/
|
270 |
+
private static $_static_logger;
|
271 |
+
|
272 |
+
/**
|
273 |
+
* @var FS_Options
|
274 |
+
* @since 1.0.2
|
275 |
+
*/
|
276 |
+
private static $_accounts;
|
277 |
+
|
278 |
+
/**
|
279 |
+
* @since 1.2.2
|
280 |
+
*
|
281 |
+
* @var number
|
282 |
+
*/
|
283 |
+
private $_module_id;
|
284 |
+
|
285 |
+
/**
|
286 |
+
* @var Freemius[]
|
287 |
+
*/
|
288 |
+
private static $_instances = array();
|
289 |
+
|
290 |
+
/**
|
291 |
+
* @since 1.2.3
|
292 |
+
*
|
293 |
+
* @var FS_Affiliate
|
294 |
+
*/
|
295 |
+
private $affiliate = null;
|
296 |
+
|
297 |
+
/**
|
298 |
+
* @since 1.2.3
|
299 |
+
*
|
300 |
+
* @var FS_AffiliateTerms
|
301 |
+
*/
|
302 |
+
private $plugin_affiliate_terms = null;
|
303 |
+
|
304 |
+
/**
|
305 |
+
* @since 1.2.3
|
306 |
+
*
|
307 |
+
* @var FS_AffiliateTerms
|
308 |
+
*/
|
309 |
+
private $custom_affiliate_terms = null;
|
310 |
+
|
311 |
+
/**
|
312 |
+
* @since 2.0.0
|
313 |
+
*
|
314 |
+
* @var bool
|
315 |
+
*/
|
316 |
+
private $_is_multisite_integrated;
|
317 |
+
|
318 |
+
/**
|
319 |
+
* @since 2.0.0
|
320 |
+
*
|
321 |
+
* @var bool True if the current request is for a network admin screen and the plugin is network active.
|
322 |
+
*/
|
323 |
+
private $_is_network_active;
|
324 |
+
|
325 |
+
/**
|
326 |
+
* @since 2.0.0
|
327 |
+
*
|
328 |
+
* @var int|null The original blog ID the plugin was loaded with.
|
329 |
+
*/
|
330 |
+
private $_blog_id = null;
|
331 |
+
|
332 |
+
/**
|
333 |
+
* @since 2.0.0
|
334 |
+
*
|
335 |
+
* @var int|null The current execution context. When true, run on network context. When int, run on the specified blog context.
|
336 |
+
*/
|
337 |
+
private $_context_is_network_or_blog_id = null;
|
338 |
+
|
339 |
+
/**
|
340 |
+
* @since 2.0.0
|
341 |
+
*
|
342 |
+
* @var string
|
343 |
+
*/
|
344 |
+
private $_dynamically_added_top_level_page_hook_name = '';
|
345 |
+
|
346 |
+
/**
|
347 |
+
* @author Leo Fajardo (@leorw)
|
348 |
+
* @since 2.3.1
|
349 |
+
*
|
350 |
+
* @var bool
|
351 |
+
*/
|
352 |
+
private $is_whitelabeled;
|
353 |
+
|
354 |
+
/**
|
355 |
+
* @author Leo Fajardo (@leorw)
|
356 |
+
* @since 2.4.0
|
357 |
+
*
|
358 |
+
* @var bool
|
359 |
+
*/
|
360 |
+
private $_is_bundle_license_auto_activation_enabled = false;
|
361 |
+
|
362 |
+
#region Uninstall Reasons IDs
|
363 |
+
|
364 |
+
const REASON_NO_LONGER_NEEDED = 1;
|
365 |
+
const REASON_FOUND_A_BETTER_PLUGIN = 2;
|
366 |
+
const REASON_NEEDED_FOR_A_SHORT_PERIOD = 3;
|
367 |
+
const REASON_BROKE_MY_SITE = 4;
|
368 |
+
const REASON_SUDDENLY_STOPPED_WORKING = 5;
|
369 |
+
const REASON_CANT_PAY_ANYMORE = 6;
|
370 |
+
const REASON_OTHER = 7;
|
371 |
+
const REASON_DIDNT_WORK = 8;
|
372 |
+
const REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION = 9;
|
373 |
+
const REASON_COULDNT_MAKE_IT_WORK = 10;
|
374 |
+
const REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE = 11;
|
375 |
+
const REASON_NOT_WORKING = 12;
|
376 |
+
const REASON_NOT_WHAT_I_WAS_LOOKING_FOR = 13;
|
377 |
+
const REASON_DIDNT_WORK_AS_EXPECTED = 14;
|
378 |
+
const REASON_TEMPORARY_DEACTIVATION = 15;
|
379 |
+
|
380 |
+
/**
|
381 |
+
* @author Leo Fajardo (@leorw)
|
382 |
+
* @since 2.3.1
|
383 |
+
*
|
384 |
+
* @var boolean|null
|
385 |
+
*/
|
386 |
+
private $_use_external_pricing = null;
|
387 |
+
/**
|
388 |
+
* @author Leo Fajardo (@leorw)
|
389 |
+
* @since 2.4.2
|
390 |
+
*
|
391 |
+
* @var string|null
|
392 |
+
*/
|
393 |
+
private $_pricing_js_path = null;
|
394 |
+
|
395 |
+
#endregion
|
396 |
+
|
397 |
+
/* Ctor
|
398 |
+
------------------------------------------------------------------------------------------------------------------*/
|
399 |
+
|
400 |
+
/**
|
401 |
+
* Main singleton instance.
|
402 |
+
*
|
403 |
+
* @author Vova Feldman (@svovaf)
|
404 |
+
* @since 1.0.0
|
405 |
+
*
|
406 |
+
* @param number $module_id
|
407 |
+
* @param string|bool $slug
|
408 |
+
* @param bool $is_init Since 1.2.1 Is initiation sequence.
|
409 |
+
*/
|
410 |
+
private function __construct( $module_id, $slug = false, $is_init = false ) {
|
411 |
+
if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
|
412 |
+
$this->store_id_slug_type_path_map( $module_id, $slug );
|
413 |
+
}
|
414 |
+
|
415 |
+
$this->_module_id = $module_id;
|
416 |
+
$this->_slug = $this->get_slug();
|
417 |
+
$this->_module_type = $this->get_module_type();
|
418 |
+
|
419 |
+
$this->_blog_id = is_multisite() ? get_current_blog_id() : null;
|
420 |
+
|
421 |
+
$this->_storage = FS_Storage::instance( $this->_module_type, $this->_slug );
|
422 |
+
|
423 |
+
$this->_cache = FS_Cache_Manager::get_manager( WP_FS___OPTION_PREFIX . "cache_{$module_id}" );
|
424 |
+
|
425 |
+
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
426 |
+
|
427 |
+
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
|
428 |
+
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
429 |
+
$this->_plugin_basename = $this->get_plugin_basename();
|
430 |
+
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
431 |
+
|
432 |
+
$this->_is_multisite_integrated = (
|
433 |
+
defined( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) &&
|
434 |
+
( true === constant( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) )
|
435 |
+
);
|
436 |
+
|
437 |
+
$this->_is_network_active = (
|
438 |
+
is_multisite() &&
|
439 |
+
$this->_is_multisite_integrated &&
|
440 |
+
// Themes are always network activated, but the ACTUAL activation is per site.
|
441 |
+
$this->is_plugin() &&
|
442 |
+
(
|
443 |
+
is_plugin_active_for_network( $this->_plugin_basename ) ||
|
444 |
+
// Plugin network level activation or uninstall.
|
445 |
+
( fs_is_network_admin() && is_plugin_inactive( $this->_plugin_basename ) )
|
446 |
+
)
|
447 |
+
);
|
448 |
+
|
449 |
+
$this->_storage->set_network_active(
|
450 |
+
$this->_is_network_active,
|
451 |
+
$this->is_delegated_connection()
|
452 |
+
);
|
453 |
+
|
454 |
+
if ( ! isset( $this->_storage->is_network_activated ) ) {
|
455 |
+
$this->_storage->is_network_activated = $this->_is_network_active;
|
456 |
+
}
|
457 |
+
|
458 |
+
if ( $this->_storage->is_network_activated != $this->_is_network_active ) {
|
459 |
+
// Update last activation level.
|
460 |
+
$this->_storage->is_network_activated = $this->_is_network_active;
|
461 |
+
|
462 |
+
$this->maybe_adjust_storage();
|
463 |
+
}
|
464 |
+
|
465 |
+
#region Migration
|
466 |
+
|
467 |
+
if ( is_multisite() ) {
|
468 |
+
/**
|
469 |
+
* If the install_timestamp exists on the site level but doesn't exist on the
|
470 |
+
* network level storage, it means that we need to process the storage with migration.
|
471 |
+
*
|
472 |
+
* The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, install_timestamp will be already set in the network level storage.
|
473 |
+
*
|
474 |
+
* @author Vova Feldman (@svovaf)
|
475 |
+
* @since 2.0.0
|
476 |
+
*/
|
477 |
+
if ( false === $this->_storage->get( 'install_timestamp', false, true ) &&
|
478 |
+
false !== $this->_storage->get( 'install_timestamp', false, false )
|
479 |
+
) {
|
480 |
+
// Initiate storage migration.
|
481 |
+
$this->_storage->migrate_to_network();
|
482 |
+
|
483 |
+
// Migrate module cache to network level storage.
|
484 |
+
$this->_cache->migrate_to_network();
|
485 |
+
}
|
486 |
+
}
|
487 |
+
|
488 |
+
#endregion
|
489 |
+
|
490 |
+
$base_name_split = explode( '/', $this->_plugin_basename );
|
491 |
+
$this->_plugin_dir_name = $base_name_split[0];
|
492 |
+
|
493 |
+
if ( $this->_logger->is_on() ) {
|
494 |
+
$this->_logger->info( 'plugin_main_file_path = ' . $this->_plugin_main_file_path );
|
495 |
+
$this->_logger->info( 'plugin_dir_path = ' . $this->_plugin_dir_path );
|
496 |
+
$this->_logger->info( 'plugin_basename = ' . $this->_plugin_basename );
|
497 |
+
$this->_logger->info( 'free_plugin_basename = ' . $this->_free_plugin_basename );
|
498 |
+
$this->_logger->info( 'plugin_dir_name = ' . $this->_plugin_dir_name );
|
499 |
+
}
|
500 |
+
|
501 |
+
// Remember link between file to slug.
|
502 |
+
$this->store_file_slug_map();
|
503 |
+
|
504 |
+
// Store plugin's initial install timestamp.
|
505 |
+
if ( ! isset( $this->_storage->install_timestamp ) ) {
|
506 |
+
$this->_storage->install_timestamp = WP_FS__SCRIPT_START_TIME;
|
507 |
+
}
|
508 |
+
|
509 |
+
if ( ! is_object( $this->_plugin ) ) {
|
510 |
+
$this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->get();
|
511 |
+
}
|
512 |
+
|
513 |
+
$this->_admin_notices = FS_Admin_Notices::instance(
|
514 |
+
$this->_slug . ( $this->is_theme() ? ':theme' : '' ),
|
515 |
+
/**
|
516 |
+
* Ensure that the admin notice will always have a title by using the stored plugin title if available and
|
517 |
+
* retrieving the title via the "get_plugin_name" method if there is no stored plugin title available.
|
518 |
+
*
|
519 |
+
* @author Leo Fajardo (@leorw)
|
520 |
+
* @since 1.2.2
|
521 |
+
*/
|
522 |
+
( is_object( $this->_plugin ) ? $this->_plugin->title : $this->get_plugin_name() ),
|
523 |
+
$this->get_unique_affix()
|
524 |
+
);
|
525 |
+
|
526 |
+
if ( 'true' === fs_request_get( 'fs_clear_api_cache' ) ||
|
527 |
+
fs_request_is_action( 'restart_freemius' )
|
528 |
+
) {
|
529 |
+
FS_Api::clear_cache();
|
530 |
+
$this->_cache->clear();
|
531 |
+
}
|
532 |
+
|
533 |
+
$this->register_constructor_hooks();
|
534 |
+
|
535 |
+
/**
|
536 |
+
* Starting from version 2.0.0, `FS_Site` entities no longer have the `plan` property and have `plan_id`
|
537 |
+
* instead. This should be called before calling `_load_account()`, otherwise, `$this->_site` will not be
|
538 |
+
* loaded in `_load_account` for versions of SDK starting from 2.0.0.
|
539 |
+
*
|
540 |
+
* @author Leo Fajardo (@leorw)
|
541 |
+
*/
|
542 |
+
self::migrate_install_plan_to_plan_id( $this->_storage );
|
543 |
+
|
544 |
+
$this->_load_account();
|
545 |
+
|
546 |
+
$this->_version_updates_handler();
|
547 |
+
}
|
548 |
+
|
549 |
+
/**
|
550 |
+
* @author Leo Fajardo (@leorw)
|
551 |
+
* @since 2.3.0
|
552 |
+
*/
|
553 |
+
private function maybe_adjust_storage() {
|
554 |
+
$install_timestamp = null;
|
555 |
+
$prev_is_premium = null;
|
556 |
+
|
557 |
+
$options_to_update = array();
|
558 |
+
|
559 |
+
$is_network_admin = fs_is_network_admin();
|
560 |
+
|
561 |
+
$network_install_timestamp = $this->_storage->get( 'install_timestamp', null, true );
|
562 |
+
|
563 |
+
if ( ! $is_network_admin ) {
|
564 |
+
if ( is_null( $network_install_timestamp ) ) {
|
565 |
+
// Plugin was not network-activated before.
|
566 |
+
return;
|
567 |
+
}
|
568 |
+
|
569 |
+
if ( is_null( $this->_storage->get( 'install_timestamp', null, false ) ) ) {
|
570 |
+
// Set the `install_timestamp` only if it's not yet set.
|
571 |
+
$install_timestamp = $network_install_timestamp;
|
572 |
+
}
|
573 |
+
|
574 |
+
$prev_is_premium = $this->_storage->get( 'prev_is_premium', null, true );
|
575 |
+
} else {
|
576 |
+
$current_wp_user = self::_get_current_wp_user();
|
577 |
+
$current_fs_user = self::_get_user_by_email( $current_wp_user->user_email );
|
578 |
+
$network_user_info = array();
|
579 |
+
|
580 |
+
$skips_count = 0;
|
581 |
+
|
582 |
+
$sites = self::get_sites();
|
583 |
+
$sites_count = count( $sites );
|
584 |
+
|
585 |
+
$blog_id_2_install_map = array();
|
586 |
+
|
587 |
+
$is_first_non_ignored_blog = true;
|
588 |
+
|
589 |
+
foreach ( $sites as $site ) {
|
590 |
+
$blog_id = self::get_site_blog_id( $site );
|
591 |
+
|
592 |
+
$blog_install_timestamp = $this->_storage->get( 'install_timestamp', null, $blog_id );
|
593 |
+
|
594 |
+
if ( is_null( $blog_install_timestamp ) ) {
|
595 |
+
// Plugin has not been installed on this blog.
|
596 |
+
continue;
|
597 |
+
}
|
598 |
+
|
599 |
+
$is_earlier_install = (
|
600 |
+
! is_null( $install_timestamp ) &&
|
601 |
+
$blog_install_timestamp < $install_timestamp
|
602 |
+
);
|
603 |
+
|
604 |
+
$install = $this->get_install_by_blog_id( $blog_id );
|
605 |
+
|
606 |
+
$update_network_user_info = false;
|
607 |
+
|
608 |
+
if ( ! is_object( $install ) ) {
|
609 |
+
if ( ! $this->_storage->get( 'is_anonymous', false, $blog_id ) ) {
|
610 |
+
// The opt-in decision (whether to skip or opt in) is yet to be made.
|
611 |
+
continue;
|
612 |
+
}
|
613 |
+
|
614 |
+
$skips_count ++;
|
615 |
+
} else {
|
616 |
+
$blog_id_2_install_map[ $blog_id ] = $install;
|
617 |
+
|
618 |
+
if ( empty( $network_user_info ) ) {
|
619 |
+
// Set the network user info for the 1st time. Choose any user information whether or not it is for the current WP user.
|
620 |
+
$update_network_user_info = true;
|
621 |
+
}
|
622 |
+
|
623 |
+
if ( ! $update_network_user_info &&
|
624 |
+
is_object( $current_fs_user ) &&
|
625 |
+
$network_user_info['user_id'] != $current_fs_user->id &&
|
626 |
+
$install->user_id == $current_fs_user->id
|
627 |
+
) {
|
628 |
+
// If an install that is owned by the current WP user is found, use its user information instead.
|
629 |
+
$update_network_user_info = true;
|
630 |
+
}
|
631 |
+
|
632 |
+
if ( ! $update_network_user_info &&
|
633 |
+
$is_earlier_install &&
|
634 |
+
( ! is_object( $current_fs_user ) || $current_fs_user->id == $install->user_id )
|
635 |
+
) {
|
636 |
+
// Update to the earliest install info if there's no install found so far that is owned by the current WP user; OR only if the found install is owned by the current WP user.
|
637 |
+
$update_network_user_info = true;
|
638 |
+
}
|
639 |
+
}
|
640 |
+
|
641 |
+
if ( $update_network_user_info ) {
|
642 |
+
$network_user_info = array(
|
643 |
+
'user_id' => $install->user_id,
|
644 |
+
'blog_id' => $blog_id
|
645 |
+
);
|
646 |
+
}
|
647 |
+
|
648 |
+
$site_prev_is_premium = $this->_storage->get( 'prev_is_premium', null, $blog_id );
|
649 |
+
|
650 |
+
if ( $is_first_non_ignored_blog ) {
|
651 |
+
$prev_is_premium = $site_prev_is_premium;
|
652 |
+
|
653 |
+
if ( is_null( $network_install_timestamp ) ) {
|
654 |
+
$install_timestamp = $blog_install_timestamp;
|
655 |
+
}
|
656 |
+
|
657 |
+
$is_first_non_ignored_blog = false;
|
658 |
+
|
659 |
+
continue;
|
660 |
+
}
|
661 |
+
|
662 |
+
if ( ! is_null( $prev_is_premium ) && $prev_is_premium !== $site_prev_is_premium ) {
|
663 |
+
// If a different `$site_prev_is_premium` value is found, do not include the option in the collection of options to update.
|
664 |
+
$prev_is_premium = null;
|
665 |
+
}
|
666 |
+
|
667 |
+
if ( $is_earlier_install ) {
|
668 |
+
// If an earlier install timestamp is found.
|
669 |
+
$install_timestamp = $blog_install_timestamp;
|
670 |
+
}
|
671 |
+
}
|
672 |
+
|
673 |
+
$installs_count = count( $blog_id_2_install_map );
|
674 |
+
|
675 |
+
if ( $sites_count === ( $installs_count + $skips_count ) ) {
|
676 |
+
if ( ! empty( $network_user_info ) ) {
|
677 |
+
$options_to_update['network_user_id'] = $network_user_info['user_id'];
|
678 |
+
$options_to_update['network_install_blog_id'] = $network_user_info['blog_id'];
|
679 |
+
|
680 |
+
foreach ( $blog_id_2_install_map as $blog_id => $install ) {
|
681 |
+
if ( $install->user_id == $network_user_info['user_id'] ) {
|
682 |
+
continue;
|
683 |
+
}
|
684 |
+
|
685 |
+
$this->_storage->store( 'is_delegated_connection', true, $blog_id );
|
686 |
+
}
|
687 |
+
}
|
688 |
+
|
689 |
+
if ( $sites_count === $skips_count ) {
|
690 |
+
/**
|
691 |
+
* Assume network-level skipping as the intended action if all actions identified were only
|
692 |
+
* skipping of the connection (i.e., no opt-ins and delegated connections so far).
|
693 |
+
*/
|
694 |
+
$options_to_update['is_anonymous_ms'] = true;
|
695 |
+
} else if ( $sites_count === $installs_count ) {
|
696 |
+
/**
|
697 |
+
* Assume network-level opt-in as the intended action if all actions identified were only opt-ins
|
698 |
+
* (i.e., no delegation and skipping of the connections so far).
|
699 |
+
*/
|
700 |
+
$options_to_update['is_network_connected'] = true;
|
701 |
+
}
|
702 |
+
}
|
703 |
+
}
|
704 |
+
|
705 |
+
if ( ! is_null( $install_timestamp ) ) {
|
706 |
+
$options_to_update['install_timestamp'] = $install_timestamp;
|
707 |
+
}
|
708 |
+
|
709 |
+
if ( ! is_null( $prev_is_premium ) ) {
|
710 |
+
$options_to_update['prev_is_premium'] = $prev_is_premium;
|
711 |
+
}
|
712 |
+
|
713 |
+
if ( ! empty( $options_to_update ) ) {
|
714 |
+
$this->adjust_storage( $options_to_update, $is_network_admin );
|
715 |
+
}
|
716 |
+
}
|
717 |
+
|
718 |
+
/**
|
719 |
+
* @author Leo Fajardo (@leorw)
|
720 |
+
* @since 2.3.0
|
721 |
+
*
|
722 |
+
* @param array $options
|
723 |
+
* @param bool $is_network_admin
|
724 |
+
*/
|
725 |
+
private function adjust_storage( $options, $is_network_admin ) {
|
726 |
+
foreach ( $options as $name => $value ) {
|
727 |
+
$this->_storage->store( $name, $value, $is_network_admin ? true : null );
|
728 |
+
}
|
729 |
+
}
|
730 |
+
|
731 |
+
/**
|
732 |
+
* Checks whether this module has a settings menu.
|
733 |
+
*
|
734 |
+
* @author Leo Fajardo (@leorw)
|
735 |
+
* @since 1.2.2
|
736 |
+
*
|
737 |
+
* @return bool
|
738 |
+
*/
|
739 |
+
function has_settings_menu() {
|
740 |
+
return ( $this->_is_network_active && fs_is_network_admin() ) ?
|
741 |
+
$this->_menu->has_network_menu() :
|
742 |
+
$this->_menu->has_menu();
|
743 |
+
}
|
744 |
+
|
745 |
+
/**
|
746 |
+
* If `true` the opt-in should be shown as a modal dialog box on the themes.php page. WordPress.org themes guidelines prohibit from redirecting the user from the themes.php page after activating a theme.
|
747 |
+
*
|
748 |
+
* @author Vova Feldman (@svovaf)
|
749 |
+
* @since 2.4.5
|
750 |
+
*
|
751 |
+
* @return bool
|
752 |
+
*/
|
753 |
+
function show_opt_in_on_themes_page() {
|
754 |
+
if ( ! $this->is_free_wp_org_theme() ) {
|
755 |
+
return false;
|
756 |
+
}
|
757 |
+
|
758 |
+
if ( ! $this->has_settings_menu() ) {
|
759 |
+
return true;
|
760 |
+
}
|
761 |
+
|
762 |
+
return $this->show_settings_with_tabs();
|
763 |
+
}
|
764 |
+
|
765 |
+
/**
|
766 |
+
* If `true` the opt-in should be shown on the product's main setting page.
|
767 |
+
*
|
768 |
+
* @author Vova Feldman (@svovaf)
|
769 |
+
* @since 2.4.5
|
770 |
+
*
|
771 |
+
* @return bool
|
772 |
+
*
|
773 |
+
* @uses show_opt_in_on_themes_page();
|
774 |
+
*/
|
775 |
+
function show_opt_in_on_setting_page() {
|
776 |
+
return ! $this->show_opt_in_on_themes_page();
|
777 |
+
}
|
778 |
+
|
779 |
+
/**
|
780 |
+
* If `true` the settings should be shown using tabs.
|
781 |
+
*
|
782 |
+
* @author Vova Feldman (@svovaf)
|
783 |
+
* @since 2.4.5
|
784 |
+
*
|
785 |
+
* @return bool
|
786 |
+
*/
|
787 |
+
function show_settings_with_tabs() {
|
788 |
+
return ( self::NAVIGATION_TABS === $this->_navigation );
|
789 |
+
}
|
790 |
+
|
791 |
+
/**
|
792 |
+
* Check if the context module is free wp.org theme.
|
793 |
+
*
|
794 |
+
* This method is helpful because:
|
795 |
+
* 1. wp.org themes are limited to a single submenu item,
|
796 |
+
* and sub-submenu items are most likely not allowed (never verified).
|
797 |
+
* 2. wp.org themes are not allowed to redirect the user
|
798 |
+
* after the theme activation, therefore, the agreed UX
|
799 |
+
* is showing the opt-in as a modal dialog box after
|
800 |
+
* activation (approved by @otto42, @emiluzelac, @greenshady, @grapplerulrich).
|
801 |
+
*
|
802 |
+
* @author Vova Feldman (@svovaf)
|
803 |
+
* @since 1.2.2.7
|
804 |
+
*
|
805 |
+
* @return bool
|
806 |
+
*/
|
807 |
+
function is_free_wp_org_theme() {
|
808 |
+
return (
|
809 |
+
$this->is_theme() &&
|
810 |
+
$this->is_org_repo_compliant() &&
|
811 |
+
! $this->is_premium()
|
812 |
+
);
|
813 |
+
}
|
814 |
+
|
815 |
+
/**
|
816 |
+
* Checks whether this a submenu item is visible.
|
817 |
+
*
|
818 |
+
* @author Vova Feldman (@svovaf)
|
819 |
+
* @since 1.2.2.6
|
820 |
+
* @since 1.2.2.7 Even if the menu item was specified to be hidden, when it is the context page, then show the submenu item so the user will have the right context page.
|
821 |
+
*
|
822 |
+
* @param string $slug
|
823 |
+
* @param bool $is_tabs_visibility_check This is used to decide if the associated tab should be shown or hidden.
|
824 |
+
*
|
825 |
+
* @return bool
|
826 |
+
*/
|
827 |
+
function is_submenu_item_visible( $slug, $is_tabs_visibility_check = false ) {
|
828 |
+
if ( $this->is_admin_page( $slug ) ) {
|
829 |
+
/**
|
830 |
+
* It is the current context page, so show the submenu item
|
831 |
+
* so the user will have the right context page, even if it
|
832 |
+
* was set to hidden.
|
833 |
+
*/
|
834 |
+
return true;
|
835 |
+
}
|
836 |
+
|
837 |
+
if ( ! $this->has_settings_menu() ) {
|
838 |
+
// No menu settings at all.
|
839 |
+
return false;
|
840 |
+
}
|
841 |
+
|
842 |
+
if (
|
843 |
+
! $is_tabs_visibility_check &&
|
844 |
+
$this->is_org_repo_compliant() &&
|
845 |
+
$this->show_settings_with_tabs()
|
846 |
+
) {
|
847 |
+
/**
|
848 |
+
* wp.org themes are limited to a single submenu item, and
|
849 |
+
* sub-submenu items are most likely not allowed (never verified).
|
850 |
+
*/
|
851 |
+
return false;
|
852 |
+
}
|
853 |
+
|
854 |
+
return $this->_menu->is_submenu_item_visible( $slug );
|
855 |
+
}
|
856 |
+
|
857 |
+
/**
|
858 |
+
* Check if a Freemius page should be accessible via the UI.
|
859 |
+
*
|
860 |
+
* @author Vova Feldman (@svovaf)
|
861 |
+
* @since 1.2.2.7
|
862 |
+
*
|
863 |
+
* @param string $slug
|
864 |
+
*
|
865 |
+
* @return bool
|
866 |
+
*/
|
867 |
+
function is_page_visible( $slug ) {
|
868 |
+
if ( $this->is_admin_page( $slug ) ) {
|
869 |
+
return true;
|
870 |
+
}
|
871 |
+
|
872 |
+
return $this->_menu->is_submenu_item_visible( $slug, true, true );
|
873 |
+
}
|
874 |
+
|
875 |
+
/**
|
876 |
+
* @author Vova Feldman (@svovaf)
|
877 |
+
* @since 1.0.9
|
878 |
+
*/
|
879 |
+
private function _version_updates_handler() {
|
880 |
+
if ( ! isset( $this->_storage->sdk_version ) || $this->_storage->sdk_version != $this->version ) {
|
881 |
+
// Freemius version upgrade mode.
|
882 |
+
$this->_storage->sdk_last_version = $this->_storage->sdk_version;
|
883 |
+
$this->_storage->sdk_version = $this->version;
|
884 |
+
|
885 |
+
if ( empty( $this->_storage->sdk_last_version ) ||
|
886 |
+
version_compare( $this->_storage->sdk_last_version, $this->version, '<' )
|
887 |
+
) {
|
888 |
+
$this->_storage->sdk_upgrade_mode = true;
|
889 |
+
$this->_storage->sdk_downgrade_mode = false;
|
890 |
+
} else {
|
891 |
+
$this->_storage->sdk_downgrade_mode = true;
|
892 |
+
$this->_storage->sdk_upgrade_mode = false;
|
893 |
+
|
894 |
+
}
|
895 |
+
|
896 |
+
$this->do_action( 'sdk_version_update', $this->_storage->sdk_last_version, $this->version );
|
897 |
+
}
|
898 |
+
|
899 |
+
$plugin_version = $this->get_plugin_version();
|
900 |
+
if ( ! isset( $this->_storage->plugin_version ) || $this->_storage->plugin_version != $plugin_version ) {
|
901 |
+
// Plugin version upgrade mode.
|
902 |
+
$this->_storage->plugin_last_version = $this->_storage->plugin_version;
|
903 |
+
$this->_storage->plugin_version = $plugin_version;
|
904 |
+
|
905 |
+
if ( empty( $this->_storage->plugin_last_version ) ||
|
906 |
+
version_compare( $this->_storage->plugin_last_version, $plugin_version, '<' )
|
907 |
+
) {
|
908 |
+
$this->_storage->plugin_upgrade_mode = true;
|
909 |
+
$this->_storage->plugin_downgrade_mode = false;
|
910 |
+
} else {
|
911 |
+
$this->_storage->plugin_downgrade_mode = true;
|
912 |
+
$this->_storage->plugin_upgrade_mode = false;
|
913 |
+
}
|
914 |
+
|
915 |
+
if ( ! empty( $this->_storage->plugin_last_version ) ) {
|
916 |
+
// Different version of the plugin was installed before, therefore it's an update.
|
917 |
+
$this->_storage->is_plugin_new_install = false;
|
918 |
+
}
|
919 |
+
|
920 |
+
$this->do_action( 'plugin_version_update', $this->_storage->plugin_last_version, $plugin_version );
|
921 |
+
}
|
922 |
+
}
|
923 |
+
|
924 |
+
#--------------------------------------------------------------------------------
|
925 |
+
#region Data Migration on SDK Update
|
926 |
+
#--------------------------------------------------------------------------------
|
927 |
+
|
928 |
+
/**
|
929 |
+
* @author Vova Feldman (@svovaf)
|
930 |
+
* @since 1.1.5
|
931 |
+
*
|
932 |
+
* @param string $sdk_prev_version
|
933 |
+
* @param string $sdk_version
|
934 |
+
*/
|
935 |
+
function _sdk_version_update( $sdk_prev_version, $sdk_version ) {
|
936 |
+
/**
|
937 |
+
* @since 1.1.7.3 Fixed unwanted connectivity test cleanup.
|
938 |
+
*/
|
939 |
+
if ( empty( $sdk_prev_version ) ) {
|
940 |
+
return;
|
941 |
+
}
|
942 |
+
|
943 |
+
if ( version_compare( $sdk_prev_version, '2.1.0', '<' ) &&
|
944 |
+
version_compare( $sdk_version, '2.1.0', '>=' )
|
945 |
+
) {
|
946 |
+
$this->_storage->handle_gdpr_admin_notice = true;
|
947 |
+
}
|
948 |
+
|
949 |
+
if ( version_compare( $sdk_prev_version, '2.0.0', '<' ) &&
|
950 |
+
version_compare( $sdk_version, '2.0.0', '>=' )
|
951 |
+
) {
|
952 |
+
$this->migrate_to_subscriptions_collection();
|
953 |
+
|
954 |
+
$this->consolidate_licenses();
|
955 |
+
|
956 |
+
// Clear trial_plan since it's now loaded from the plans collection when needed.
|
957 |
+
$this->_storage->remove( 'trial_plan', true, false );
|
958 |
+
}
|
959 |
+
|
960 |
+
if ( version_compare( $sdk_prev_version, '1.2.3', '<' ) &&
|
961 |
+
version_compare( $sdk_version, '1.2.3', '>=' )
|
962 |
+
) {
|
963 |
+
/**
|
964 |
+
* Starting from version 1.2.3, paths are stored as relative instead of absolute and some of them can be
|
965 |
+
* invalid.
|
966 |
+
*
|
967 |
+
* @author Leo Fajardo (@leorw)
|
968 |
+
*/
|
969 |
+
$this->remove_invalid_paths();
|
970 |
+
}
|
971 |
+
|
972 |
+
if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
|
973 |
+
version_compare( $sdk_version, '1.1.5', '>=' )
|
974 |
+
) {
|
975 |
+
// On version 1.1.5 merged connectivity and is_on data.
|
976 |
+
if ( isset( $this->_storage->connectivity_test ) ) {
|
977 |
+
if ( ! isset( $this->_storage->is_on ) ) {
|
978 |
+
unset( $this->_storage->connectivity_test );
|
979 |
+
} else {
|
980 |
+
$connectivity_data = $this->_storage->connectivity_test;
|
981 |
+
$connectivity_data['is_active'] = $this->_storage->is_on['is_active'];
|
982 |
+
$connectivity_data['timestamp'] = $this->_storage->is_on['timestamp'];
|
983 |
+
|
984 |
+
// Override.
|
985 |
+
$this->_storage->connectivity_test = $connectivity_data;
|
986 |
+
|
987 |
+
// Remove previous structure.
|
988 |
+
unset( $this->_storage->is_on );
|
989 |
+
}
|
990 |
+
|
991 |
+
}
|
992 |
+
}
|
993 |
+
|
994 |
+
if (
|
995 |
+
version_compare( $sdk_prev_version, '2.2.1', '<' ) &&
|
996 |
+
version_compare( $sdk_version, '2.2.1', '>=' )
|
997 |
+
) {
|
998 |
+
/**
|
999 |
+
* Clear the file cache without storing the previous path since it could be a wrong path. For example,
|
1000 |
+
* in the versions of the SDK lower than 2.2.1, it's possible for the path of an add-on to be the same
|
1001 |
+
* as the parent plugin's when the add-on was auto-installed since the relevant method names were not
|
1002 |
+
* skipped in the logic that determines the right path in the `get_caller_main_file_and_type` method
|
1003 |
+
* (e.g. `try_activate_plugin`). Since it was an auto-installation, the caller was the parent plugin
|
1004 |
+
* and so its path was used. In case the stored path is wrong, clearing the cache will resolve issues
|
1005 |
+
* related to data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
|
1006 |
+
*
|
1007 |
+
* @author Leo Fajardo (@leorw)
|
1008 |
+
* @since 2.2.1
|
1009 |
+
*/
|
1010 |
+
$this->clear_module_main_file_cache( false );
|
1011 |
+
}
|
1012 |
+
}
|
1013 |
+
|
1014 |
+
/**
|
1015 |
+
* @author Leo Fajardo (@leorw)
|
1016 |
+
* @since 2.0.0
|
1017 |
+
*
|
1018 |
+
* @param \FS_Storage $storage
|
1019 |
+
* @param bool|int|null $blog_id
|
1020 |
+
*/
|
1021 |
+
private static function migrate_install_plan_to_plan_id( FS_Storage $storage, $blog_id = null ) {
|
1022 |
+
if ( empty( $storage->sdk_version ) ) {
|
1023 |
+
// New installation of the plugin, no need to upgrade.
|
1024 |
+
return;
|
1025 |
+
}
|
1026 |
+
|
1027 |
+
if ( ! version_compare( $storage->sdk_version, '2.0.0', '<' ) ) {
|
1028 |
+
// Previous version is >= 2.0.0, so no need to migrate.
|
1029 |
+
return;
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
// Alias.
|
1033 |
+
$module_type = $storage->get_module_type();
|
1034 |
+
$module_slug = $storage->get_module_slug();
|
1035 |
+
|
1036 |
+
$installs = self::get_all_sites( $module_type, $blog_id );
|
1037 |
+
$install = isset( $installs[ $module_slug ] ) ? $installs[ $module_slug ] : null;
|
1038 |
+
|
1039 |
+
if ( ! is_object( $install ) ) {
|
1040 |
+
return;
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
if ( isset( $install->plan ) && is_object( $install->plan ) ) {
|
1044 |
+
if ( isset( $install->plan->id ) && ! empty( $install->plan->id ) ) {
|
1045 |
+
$install->plan_id = self::_decrypt( $install->plan->id );
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
unset( $install->plan );
|
1049 |
+
|
1050 |
+
$installs[ $module_slug ] = clone $install;
|
1051 |
+
|
1052 |
+
self::set_account_option_by_module(
|
1053 |
+
$module_type,
|
1054 |
+
'sites',
|
1055 |
+
$installs,
|
1056 |
+
true,
|
1057 |
+
$blog_id
|
1058 |
+
);
|
1059 |
+
}
|
1060 |
+
}
|
1061 |
+
|
1062 |
+
/**
|
1063 |
+
* @author Leo Fajardo (@leorw)
|
1064 |
+
* @since 2.0.0
|
1065 |
+
*/
|
1066 |
+
private function migrate_to_subscriptions_collection() {
|
1067 |
+
if ( ! is_object( $this->_site ) ) {
|
1068 |
+
return;
|
1069 |
+
}
|
1070 |
+
|
1071 |
+
if ( isset( $this->_storage->subscription ) && is_object( $this->_storage->subscription ) ) {
|
1072 |
+
$this->_storage->subscriptions = array( fs_get_entity( $this->_storage->subscription, FS_Subscription::get_class_name() ) );
|
1073 |
+
}
|
1074 |
+
}
|
1075 |
+
|
1076 |
+
/**
|
1077 |
+
* @author Leo Fajardo (@leorw)
|
1078 |
+
* @since 2.0.0
|
1079 |
+
*/
|
1080 |
+
private function consolidate_licenses() {
|
1081 |
+
$plugin_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_PLUGIN );
|
1082 |
+
if ( isset( $plugin_licenses[ $this->_slug ] ) ) {
|
1083 |
+
$plugin_licenses = $plugin_licenses[ $this->_slug ];
|
1084 |
+
} else {
|
1085 |
+
$plugin_licenses = array();
|
1086 |
+
}
|
1087 |
+
|
1088 |
+
$theme_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_THEME );
|
1089 |
+
if ( isset( $theme_licenses[ $this->_slug ] ) ) {
|
1090 |
+
$theme_licenses = $theme_licenses[ $this->_slug ];
|
1091 |
+
} else {
|
1092 |
+
$theme_licenses = array();
|
1093 |
+
}
|
1094 |
+
|
1095 |
+
if ( empty( $plugin_licenses ) && empty( $theme_licenses ) ) {
|
1096 |
+
return;
|
1097 |
+
}
|
1098 |
+
|
1099 |
+
$all_licenses = array();
|
1100 |
+
$user_id_license_ids_map = array();
|
1101 |
+
|
1102 |
+
foreach ( $plugin_licenses as $user_id => $user_licenses ) {
|
1103 |
+
if ( is_array( $user_licenses ) ) {
|
1104 |
+
if ( ! isset( $user_license_ids[ $user_id ] ) ) {
|
1105 |
+
$user_id_license_ids_map[ $user_id ] = array();
|
1106 |
+
}
|
1107 |
+
|
1108 |
+
foreach ( $user_licenses as $user_license ) {
|
1109 |
+
$all_licenses[] = $user_license;
|
1110 |
+
$user_id_license_ids_map[ $user_id ][] = $user_license->id;
|
1111 |
+
}
|
1112 |
+
}
|
1113 |
+
}
|
1114 |
+
|
1115 |
+
foreach ( $theme_licenses as $user_id => $user_licenses ) {
|
1116 |
+
if ( is_array( $user_licenses ) ) {
|
1117 |
+
if ( ! isset( $user_license_ids[ $user_id ] ) ) {
|
1118 |
+
$user_id_license_ids_map[ $user_id ] = array();
|
1119 |
+
}
|
1120 |
+
|
1121 |
+
foreach ( $user_licenses as $user_license ) {
|
1122 |
+
$all_licenses[] = $user_license;
|
1123 |
+
$user_id_license_ids_map[ $user_id ][] = $user_license->id;
|
1124 |
+
}
|
1125 |
+
}
|
1126 |
+
}
|
1127 |
+
|
1128 |
+
self::store_user_id_license_ids_map(
|
1129 |
+
$user_id_license_ids_map,
|
1130 |
+
$this->_module_id
|
1131 |
+
);
|
1132 |
+
|
1133 |
+
$this->_store_licenses( true, $this->_module_id, $all_licenses );
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
/**
|
1137 |
+
* Remove invalid paths.
|
1138 |
+
*
|
1139 |
+
* @author Leo Fajardo (@leorw)
|
1140 |
+
* @since 1.2.3
|
1141 |
+
*/
|
1142 |
+
private function remove_invalid_paths() {
|
1143 |
+
// Remove invalid path that is still associated with the current slug if there's any.
|
1144 |
+
$file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
|
1145 |
+
foreach ( $file_slug_map as $plugin_basename => $slug ) {
|
1146 |
+
if ( $slug === $this->_slug &&
|
1147 |
+
$plugin_basename !== $this->_plugin_basename &&
|
1148 |
+
! file_exists( $this->get_absolute_path( $plugin_basename ) )
|
1149 |
+
) {
|
1150 |
+
unset( $file_slug_map[ $plugin_basename ] );
|
1151 |
+
self::$_accounts->set_option( 'file_slug_map', $file_slug_map, true );
|
1152 |
+
|
1153 |
+
break;
|
1154 |
+
}
|
1155 |
+
}
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
/**
|
1159 |
+
* @author Vova Feldman (@svovaf)
|
1160 |
+
* @since 1.2.2.7
|
1161 |
+
*
|
1162 |
+
* @param string $plugin_prev_version
|
1163 |
+
* @param string $plugin_version
|
1164 |
+
*/
|
1165 |
+
function _after_version_update( $plugin_prev_version, $plugin_version ) {
|
1166 |
+
if ( $this->is_theme() ) {
|
1167 |
+
// Expire the cache of the previous tabs since the theme may
|
1168 |
+
// have setting updates.
|
1169 |
+
$this->_cache->expire( 'tabs' );
|
1170 |
+
$this->_cache->expire( 'tabs_stylesheets' );
|
1171 |
+
}
|
1172 |
+
}
|
1173 |
+
|
1174 |
+
/**
|
1175 |
+
* A special migration logic for the $_accounts, executed for all the plugins in the system:
|
1176 |
+
* - Moves some data to the network level storage.
|
1177 |
+
* - If the plugin's connection was skipped for all sites, set the plugin as if it was network skipped.
|
1178 |
+
* - If the plugin's connection was ignored for all sites, don't do anything in terms of the network connection.
|
1179 |
+
* - If the plugin was connected to all sites by the same super-admin, set the plugin as if was network opted-in for all sites.
|
1180 |
+
* - If there's at least one site that was connected by a super-admin, find the "main super-admin" (the one that installed the majority of the plugin installs) and set the plugin as if was network activated with the main super-admin, set all the sites that were skipped or opted-in with a different user to delegated mode. Then, prompt the currently logged super-admin to choose what to do with the ignored sites.
|
1181 |
+
* - If there are any sites in the network which the connection decision was not yet taken for, set this plugin into network activation mode so a super-admin can choose what to do with the rest of the sites.
|
1182 |
+
*
|
1183 |
+
* @author Vova Feldman (@svovaf)
|
1184 |
+
* @since 2.0.0
|
1185 |
+
*/
|
1186 |
+
private static function migrate_accounts_to_network() {
|
1187 |
+
$sites = self::get_sites();
|
1188 |
+
$sites_count = count( $sites );
|
1189 |
+
$connection_status = array();
|
1190 |
+
$plugin_slugs = array();
|
1191 |
+
foreach ( $sites as $site ) {
|
1192 |
+
$blog_id = self::get_site_blog_id( $site );
|
1193 |
+
|
1194 |
+
self::$_accounts->migrate_to_network( $blog_id );
|
1195 |
+
|
1196 |
+
/**
|
1197 |
+
* Build a list of all Freemius powered plugins slugs.
|
1198 |
+
*/
|
1199 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array(), $blog_id );
|
1200 |
+
foreach ( $id_slug_type_path_map as $module_id => $data ) {
|
1201 |
+
if ( WP_FS__MODULE_TYPE_PLUGIN === $data['type'] ) {
|
1202 |
+
$plugin_slugs[ $data['slug'] ] = true;
|
1203 |
+
}
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
$installs = self::get_account_option( 'sites', WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
|
1207 |
+
|
1208 |
+
if ( is_array( $installs ) ) {
|
1209 |
+
foreach ( $installs as $slug => $install ) {
|
1210 |
+
if ( ! isset( $connection_status[ $slug ] ) ) {
|
1211 |
+
$connection_status[ $slug ] = array();
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
if ( is_object( $install ) &&
|
1215 |
+
FS_Site::is_valid_id( $install->id ) &&
|
1216 |
+
FS_User::is_valid_id( $install->user_id )
|
1217 |
+
) {
|
1218 |
+
$connection_status[ $slug ][ $blog_id ] = $install->user_id;
|
1219 |
+
}
|
1220 |
+
}
|
1221 |
+
}
|
1222 |
+
}
|
1223 |
+
|
1224 |
+
foreach ( $plugin_slugs as $slug => $true ) {
|
1225 |
+
if ( ! isset( $connection_status[ $slug ] ) ) {
|
1226 |
+
$connection_status[ $slug ] = array();
|
1227 |
+
}
|
1228 |
+
|
1229 |
+
foreach ( $sites as $site ) {
|
1230 |
+
$blog_id = self::get_site_blog_id( $site );
|
1231 |
+
|
1232 |
+
if ( isset( $connection_status[ $slug ][ $blog_id ] ) ) {
|
1233 |
+
continue;
|
1234 |
+
}
|
1235 |
+
|
1236 |
+
$storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
|
1237 |
+
|
1238 |
+
$is_anonymous = $storage->get( 'is_anonymous', null, $blog_id );
|
1239 |
+
|
1240 |
+
if ( ! is_null( $is_anonymous ) ) {
|
1241 |
+
// Since 1.1.3 is_anonymous is an array.
|
1242 |
+
if ( is_array( $is_anonymous ) && isset( $is_anonymous['is'] ) ) {
|
1243 |
+
$is_anonymous = $is_anonymous['is'];
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
if ( is_bool( $is_anonymous ) && true === $is_anonymous ) {
|
1247 |
+
$connection_status[ $slug ][ $blog_id ] = 'skipped';
|
1248 |
+
}
|
1249 |
+
}
|
1250 |
+
|
1251 |
+
if ( ! isset( $connection_status[ $slug ][ $blog_id ] ) ) {
|
1252 |
+
$connection_status[ $slug ][ $blog_id ] = 'ignored';
|
1253 |
+
}
|
1254 |
+
}
|
1255 |
+
}
|
1256 |
+
|
1257 |
+
$super_admins = array();
|
1258 |
+
|
1259 |
+
foreach ( $connection_status as $slug => $blogs_status ) {
|
1260 |
+
$skips = 0;
|
1261 |
+
$ignores = 0;
|
1262 |
+
$connections = 0;
|
1263 |
+
$opted_in_users = array();
|
1264 |
+
$opted_in_super_admins = array();
|
1265 |
+
|
1266 |
+
$storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
|
1267 |
+
|
1268 |
+
foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
|
1269 |
+
if ( 'skipped' === $status_or_user_id ) {
|
1270 |
+
$skips ++;
|
1271 |
+
} else if ( 'ignored' === $status_or_user_id ) {
|
1272 |
+
$ignores ++;
|
1273 |
+
} else if ( FS_User::is_valid_id( $status_or_user_id ) ) {
|
1274 |
+
$connections ++;
|
1275 |
+
|
1276 |
+
if ( ! isset( $opted_in_users[ $status_or_user_id ] ) ) {
|
1277 |
+
$opted_in_users[ $status_or_user_id ] = array();
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
$opted_in_users[ $status_or_user_id ][] = $blog_id;
|
1281 |
+
|
1282 |
+
if ( isset( $super_admins[ $status_or_user_id ] ) ||
|
1283 |
+
self::is_super_admin( $status_or_user_id )
|
1284 |
+
) {
|
1285 |
+
// Cache super-admin data.
|
1286 |
+
$super_admins[ $status_or_user_id ] = true;
|
1287 |
+
|
1288 |
+
// Remember opted-in super-admins for the plugin.
|
1289 |
+
$opted_in_super_admins[ $status_or_user_id ] = true;
|
1290 |
+
}
|
1291 |
+
}
|
1292 |
+
}
|
1293 |
+
|
1294 |
+
$main_super_admin_user_id = null;
|
1295 |
+
$all_migrated = false;
|
1296 |
+
if ( $sites_count == $skips ) {
|
1297 |
+
// All sites were skipped -> network skip by copying the anonymous mode from any of the sites.
|
1298 |
+
$storage->is_anonymous_ms = $storage->is_anonymous;
|
1299 |
+
|
1300 |
+
$all_migrated = true;
|
1301 |
+
} else if ( $sites_count == $ignores ) {
|
1302 |
+
// Don't do anything, still in activation mode.
|
1303 |
+
|
1304 |
+
$all_migrated = true;
|
1305 |
+
} else if ( 0 < count( $opted_in_super_admins ) ) {
|
1306 |
+
// Find the super-admin with the majority of installs.
|
1307 |
+
$max_installs_by_super_admin = 0;
|
1308 |
+
foreach ( $opted_in_super_admins as $user_id => $true ) {
|
1309 |
+
$installs_count = count( $opted_in_users[ $user_id ] );
|
1310 |
+
|
1311 |
+
if ( $installs_count > $max_installs_by_super_admin ) {
|
1312 |
+
$max_installs_by_super_admin = $installs_count;
|
1313 |
+
$main_super_admin_user_id = $user_id;
|
1314 |
+
}
|
1315 |
+
}
|
1316 |
+
|
1317 |
+
if ( $sites_count == $connections && 1 == count( $opted_in_super_admins ) ) {
|
1318 |
+
// Super-admin opted-in for all sites in the network.
|
1319 |
+
$storage->is_network_connected = true;
|
1320 |
+
|
1321 |
+
$all_migrated = true;
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
// Store network user.
|
1325 |
+
$storage->network_user_id = $main_super_admin_user_id;
|
1326 |
+
|
1327 |
+
$storage->network_install_blog_id = ( $sites_count == $connections ) ?
|
1328 |
+
// Since all sites are opted-in, associating with the main site.
|
1329 |
+
get_current_blog_id() :
|
1330 |
+
// Associating with the 1st found opted-in site.
|
1331 |
+
$opted_in_users[ $main_super_admin_user_id ][0];
|
1332 |
+
|
1333 |
+
/**
|
1334 |
+
* Make sure we migrate the plan ID of the network install, otherwise, if after the migration
|
1335 |
+
* the 1st page that will be loaded is the network level WP Admin and $storage->network_install_blog_id
|
1336 |
+
* is different than the main site of the network, the $this->_site will not be set since the plan_id
|
1337 |
+
* will be empty.
|
1338 |
+
*/
|
1339 |
+
$storage->migrate_to_network();
|
1340 |
+
self::migrate_install_plan_to_plan_id( $storage, $storage->network_install_blog_id );
|
1341 |
+
} else {
|
1342 |
+
// At least one opt-in. All the opt-in were created by a non-super-admin.
|
1343 |
+
if ( 0 == $ignores ) {
|
1344 |
+
// All sites were opted-in or skipped, all by non-super-admin. So delegate all.
|
1345 |
+
$storage->store( 'is_delegated_connection', true, true );
|
1346 |
+
|
1347 |
+
$all_migrated = true;
|
1348 |
+
}
|
1349 |
+
}
|
1350 |
+
|
1351 |
+
if ( ! $all_migrated ) {
|
1352 |
+
/**
|
1353 |
+
* Delegate all sites that were:
|
1354 |
+
* 1) Opted-in by a user that is NOT the main-super-admin.
|
1355 |
+
* 2) Skipped and non of the sites was opted-in by a super-admin. If any site was opted-in by a super-admin, there will be a main-super-admin, and we consider the skip as if it was done by that user.
|
1356 |
+
*/
|
1357 |
+
foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
|
1358 |
+
if ( $status_or_user_id == $main_super_admin_user_id ) {
|
1359 |
+
continue;
|
1360 |
+
}
|
1361 |
+
|
1362 |
+
if ( FS_User::is_valid_id( $status_or_user_id ) ||
|
1363 |
+
( 'skipped' === $status_or_user_id && is_null( $main_super_admin_user_id ) )
|
1364 |
+
) {
|
1365 |
+
$storage->store( 'is_delegated_connection', true, $blog_id );
|
1366 |
+
}
|
1367 |
+
}
|
1368 |
+
}
|
1369 |
+
|
1370 |
+
|
1371 |
+
if ( ( $connections + $skips > 0 ) ) {
|
1372 |
+
if ( $ignores > 0 ) {
|
1373 |
+
/**
|
1374 |
+
* If admin already opted-in or skipped in any of the network sites, and also
|
1375 |
+
* have sites which the connection decision was not yet taken, set this plugin
|
1376 |
+
* into network activation mode so the super-admin can choose what to do with
|
1377 |
+
* the rest of the sites.
|
1378 |
+
*/
|
1379 |
+
self::set_network_upgrade_mode( $storage );
|
1380 |
+
}
|
1381 |
+
}
|
1382 |
+
}
|
1383 |
+
}
|
1384 |
+
|
1385 |
+
/**
|
1386 |
+
* Set a module into network upgrade mode.
|
1387 |
+
*
|
1388 |
+
* @author Vova Feldman (@svovaf)
|
1389 |
+
* @since 2.0.0
|
1390 |
+
*
|
1391 |
+
* @param \FS_Storage $storage
|
1392 |
+
*
|
1393 |
+
* @return bool
|
1394 |
+
*/
|
1395 |
+
private static function set_network_upgrade_mode( FS_Storage $storage ) {
|
1396 |
+
return $storage->is_network_activation = true;
|
1397 |
+
}
|
1398 |
+
|
1399 |
+
/**
|
1400 |
+
* Will return true after upgrading to the SDK with the network level integration,
|
1401 |
+
* when the super-admin involvement is required regarding the rest of the sites.
|
1402 |
+
*
|
1403 |
+
* @author Vova Feldman (@svovaf)
|
1404 |
+
* @since 2.0.0
|
1405 |
+
*
|
1406 |
+
* @return bool
|
1407 |
+
*/
|
1408 |
+
function is_network_upgrade_mode() {
|
1409 |
+
return $this->_storage->get( 'is_network_activation' );
|
1410 |
+
}
|
1411 |
+
|
1412 |
+
/**
|
1413 |
+
* Clear flag after the upgrade mode completion.
|
1414 |
+
*
|
1415 |
+
* @author Vova Feldman (@svovaf)
|
1416 |
+
* @since 2.0.0
|
1417 |
+
*
|
1418 |
+
* @return bool True if network activation was on and now completed.
|
1419 |
+
*/
|
1420 |
+
private function network_upgrade_mode_completed() {
|
1421 |
+
if ( fs_is_network_admin() && $this->is_network_upgrade_mode() ) {
|
1422 |
+
$this->_storage->remove( 'is_network_activation' );
|
1423 |
+
|
1424 |
+
return true;
|
1425 |
+
}
|
1426 |
+
|
1427 |
+
return false;
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
#endregion
|
1431 |
+
|
1432 |
+
/**
|
1433 |
+
* This action is connected to the 'plugins_loaded' hook and helps to determine
|
1434 |
+
* if this is a new plugin installation or a plugin update.
|
1435 |
+
*
|
1436 |
+
* There are 3 different use-cases:
|
1437 |
+
* 1) New plugin installation right with Freemius:
|
1438 |
+
* 1.1 _activate_plugin_event_hook() will be executed first
|
1439 |
+
* 1.2 Since $this->_storage->is_plugin_new_install is not set,
|
1440 |
+
* and $this->_storage->plugin_last_version is not set,
|
1441 |
+
* $this->_storage->is_plugin_new_install will be set to TRUE.
|
1442 |
+
* 1.3 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
|
1443 |
+
* be already set to TRUE.
|
1444 |
+
*
|
1445 |
+
* 2) Plugin update, didn't have Freemius before, and now have the SDK:
|
1446 |
+
* 2.1 _activate_plugin_event_hook() will not be executed, because
|
1447 |
+
* the activation hook do NOT fires on updates since WP 3.1.
|
1448 |
+
* 2.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
|
1449 |
+
* be empty, therefore, it will be set to FALSE.
|
1450 |
+
*
|
1451 |
+
* 3) Plugin update, had Freemius in prev version as well:
|
1452 |
+
* 3.1 _version_updates_handler() will be executed 1st, since FS was installed
|
1453 |
+
* before, $this->_storage->plugin_last_version will NOT be empty,
|
1454 |
+
* therefore, $this->_storage->is_plugin_new_install will be set to FALSE.
|
1455 |
+
* 3.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install is
|
1456 |
+
* already set, therefore, it will not be modified.
|
1457 |
+
*
|
1458 |
+
* Use-case #3 is backward compatible, #3.1 will be executed since 1.0.9.
|
1459 |
+
*
|
1460 |
+
* NOTE:
|
1461 |
+
* The only fallback of this mechanism is if an admin updates a plugin based on use-case #2,
|
1462 |
+
* and then, the next immediate PageView is the plugin's main settings page, it will not
|
1463 |
+
* show the opt-in right away. The reason it will happen is because Freemius execution
|
1464 |
+
* will be turned off till the plugin is fully loaded at least once
|
1465 |
+
* (till $this->_storage->was_plugin_loaded is TRUE).
|
1466 |
+
*
|
1467 |
+
* @author Vova Feldman (@svovaf)
|
1468 |
+
* @since 1.1.9
|
1469 |
+
*
|
1470 |
+
*/
|
1471 |
+
function _plugins_loaded() {
|
1472 |
+
// Update flag that plugin was loaded with Freemius at least once.
|
1473 |
+
$this->_storage->was_plugin_loaded = true;
|
1474 |
+
|
1475 |
+
/**
|
1476 |
+
* Bug fix - only set to false when it's a plugin, due to the
|
1477 |
+
* execution sequence of the theme hooks and our methods, if
|
1478 |
+
* this will be set for themes, Freemius will always assume
|
1479 |
+
* it's a theme update.
|
1480 |
+
*
|
1481 |
+
* @author Vova Feldman (@svovaf)
|
1482 |
+
* @since 1.2.2.2
|
1483 |
+
*/
|
1484 |
+
if ( $this->is_plugin() &&
|
1485 |
+
! isset( $this->_storage->is_plugin_new_install )
|
1486 |
+
) {
|
1487 |
+
$this->_storage->is_plugin_new_install = (
|
1488 |
+
! is_plugin_active( $this->_plugin_basename ) &&
|
1489 |
+
empty( $this->_storage->plugin_last_version )
|
1490 |
+
);
|
1491 |
+
}
|
1492 |
+
}
|
1493 |
+
|
1494 |
+
/**
|
1495 |
+
* Add special parameter to WP admin AJAX calls so when we
|
1496 |
+
* process AJAX calls we can identify its source properly.
|
1497 |
+
*
|
1498 |
+
* @author Leo Fajardo (@leorw)
|
1499 |
+
* @since 2.0.0
|
1500 |
+
*/
|
1501 |
+
static function _enrich_ajax_url() {
|
1502 |
+
$admin_param = is_network_admin() ?
|
1503 |
+
'_fs_network_admin' :
|
1504 |
+
'_fs_blog_admin';
|
1505 |
+
?>
|
1506 |
+
<script type="text/javascript">
|
1507 |
+
(function ($) {
|
1508 |
+
$(document).ajaxSend(function (event, jqxhr, settings) {
|
1509 |
+
if (settings.url &&
|
1510 |
+
-1 < settings.url.indexOf('admin-ajax.php') &&
|
1511 |
+
! ( settings.url.indexOf( '<?php echo $admin_param ?>' ) > 0 )
|
1512 |
+
) {
|
1513 |
+
if (
|
1514 |
+
'string' === typeof settings.data &&
|
1515 |
+
settings.data.indexOf( 'action=heartbeat' ) > 0
|
1516 |
+
) {
|
1517 |
+
return;
|
1518 |
+
}
|
1519 |
+
|
1520 |
+
if (settings.url.indexOf('?') > 0) {
|
1521 |
+
settings.url += '&';
|
1522 |
+
} else {
|
1523 |
+
settings.url += '?';
|
1524 |
+
}
|
1525 |
+
|
1526 |
+
settings.url += '<?php echo $admin_param ?>=true';
|
1527 |
+
}
|
1528 |
+
});
|
1529 |
+
})(jQuery);
|
1530 |
+
</script>
|
1531 |
+
<?php
|
1532 |
+
}
|
1533 |
+
|
1534 |
+
/**
|
1535 |
+
* Opens the support forum subemenu item in a new browser page.
|
1536 |
+
*
|
1537 |
+
* @author Vova Feldman (@svovaf)
|
1538 |
+
* @since 2.1.4
|
1539 |
+
*/
|
1540 |
+
static function _open_support_forum_in_new_page() {
|
1541 |
+
?>
|
1542 |
+
<script type="text/javascript">
|
1543 |
+
(function ($) {
|
1544 |
+
$('.fs-submenu-item.wp-support-forum').parent().attr( { target: '_blank', rel: 'noopener noreferrer' } );
|
1545 |
+
})(jQuery);
|
1546 |
+
</script>
|
1547 |
+
<?php
|
1548 |
+
}
|
1549 |
+
|
1550 |
+
/**
|
1551 |
+
* @author Vova Feldman (@svovaf)
|
1552 |
+
* @since 1.0.9
|
1553 |
+
*/
|
1554 |
+
private function register_constructor_hooks() {
|
1555 |
+
$this->_logger->entrance();
|
1556 |
+
|
1557 |
+
if ( is_admin() ) {
|
1558 |
+
add_action( 'admin_init', array( &$this, '_hook_action_links_and_register_account_hooks' ) );
|
1559 |
+
|
1560 |
+
if ( $this->is_plugin() ) {
|
1561 |
+
if ( self::is_plugin_install_page() && true !== fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) {
|
1562 |
+
/**
|
1563 |
+
* Unless the `fs_allow_updater_and_dialog` URL param exists and its value is `true`, make
|
1564 |
+
* Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php)
|
1565 |
+
* so that they won't interfere with the .org plugins' functionalities on that page (e.g.
|
1566 |
+
* updating of a .org plugin).
|
1567 |
+
*/
|
1568 |
+
add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
|
1569 |
+
} else if ( self::is_plugins_page() || self::is_updates_page() ) {
|
1570 |
+
/**
|
1571 |
+
* On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can determine if the plugin information dialog should show information from Freemius.
|
1572 |
+
*
|
1573 |
+
* @author Leo Fajardo (@leorw)
|
1574 |
+
* @since 2.2.3
|
1575 |
+
*/
|
1576 |
+
add_action( 'admin_footer', array( 'Freemius', '_prepend_fs_allow_updater_and_dialog_flag_url_param' ) );
|
1577 |
+
}
|
1578 |
+
|
1579 |
+
$plugin_dir = dirname( $this->_plugin_dir_path ) . '/';
|
1580 |
+
|
1581 |
+
/**
|
1582 |
+
* @since 1.2.2
|
1583 |
+
*
|
1584 |
+
* Hook to both free and premium version activations to support
|
1585 |
+
* auto deactivation on the other version activation.
|
1586 |
+
*/
|
1587 |
+
register_activation_hook(
|
1588 |
+
$plugin_dir . $this->_free_plugin_basename,
|
1589 |
+
array( &$this, '_activate_plugin_event_hook' )
|
1590 |
+
);
|
1591 |
+
|
1592 |
+
register_activation_hook(
|
1593 |
+
$plugin_dir . $this->premium_plugin_basename(),
|
1594 |
+
array( &$this, '_activate_plugin_event_hook' )
|
1595 |
+
);
|
1596 |
+
} else {
|
1597 |
+
add_action( 'after_switch_theme', array( &$this, '_activate_theme_event_hook' ), 10, 2 );
|
1598 |
+
|
1599 |
+
add_action( 'admin_footer', array( &$this, '_style_premium_theme' ) );
|
1600 |
+
}
|
1601 |
+
|
1602 |
+
/**
|
1603 |
+
* Part of the mechanism to identify new plugin install vs. plugin update.
|
1604 |
+
*
|
1605 |
+
* @author Vova Feldman (@svovaf)
|
1606 |
+
* @since 1.1.9
|
1607 |
+
*/
|
1608 |
+
if ( empty( $this->_storage->was_plugin_loaded ) ) {
|
1609 |
+
/**
|
1610 |
+
* During the plugin activation (not theme), 'plugins_loaded' will be already executed
|
1611 |
+
* when the logic gets here since the activation logic first add the activate plugins,
|
1612 |
+
* then triggers 'plugins_loaded', and only then include the code of the plugin that
|
1613 |
+
* is activated. Which means that _plugins_loaded() will NOT be executed during the
|
1614 |
+
* plugin activation, and that IS intentional.
|
1615 |
+
*
|
1616 |
+
* @author Vova Feldman (@svovaf)
|
1617 |
+
*/
|
1618 |
+
if ( $this->is_plugin() &&
|
1619 |
+
$this->is_activation_mode( false ) &&
|
1620 |
+
0 == did_action( 'plugins_loaded' )
|
1621 |
+
) {
|
1622 |
+
add_action( 'plugins_loaded', array( &$this, '_plugins_loaded' ) );
|
1623 |
+
} else {
|
1624 |
+
// If was activated before, then it was already loaded before.
|
1625 |
+
$this->_plugins_loaded();
|
1626 |
+
}
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
if ( ! self::is_ajax() ) {
|
1630 |
+
if ( ! $this->is_addon() ) {
|
1631 |
+
add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
|
1632 |
+
}
|
1633 |
+
}
|
1634 |
+
|
1635 |
+
if ( $this->_storage->handle_gdpr_admin_notice ) {
|
1636 |
+
add_action( 'init', array( &$this, '_maybe_show_gdpr_admin_notice' ) );
|
1637 |
+
}
|
1638 |
+
|
1639 |
+
add_action( 'init', array( &$this, '_maybe_add_gdpr_optin_ajax_handler') );
|
1640 |
+
add_action( 'init', array( &$this, '_maybe_add_pricing_ajax_handler' ) );
|
1641 |
+
}
|
1642 |
+
|
1643 |
+
if ( $this->is_plugin() ) {
|
1644 |
+
if ( $this->_is_network_active ) {
|
1645 |
+
add_action( 'wpmu_new_blog', array( $this, '_after_new_blog_callback' ), 10, 6 );
|
1646 |
+
}
|
1647 |
+
|
1648 |
+
register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
|
1649 |
+
}
|
1650 |
+
|
1651 |
+
if ( is_multisite() ) {
|
1652 |
+
add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1653 |
+
add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1654 |
+
add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1655 |
+
add_action( 'deleted_blog', array( &$this, '_after_site_deleted_callback' ), 10, 2 );
|
1656 |
+
|
1657 |
+
add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1658 |
+
add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1659 |
+
add_action( 'make_ham_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1660 |
+
}
|
1661 |
+
|
1662 |
+
if ( $this->is_theme() &&
|
1663 |
+
self::is_customizer() &&
|
1664 |
+
$this->apply_filters( 'show_customizer_upsell', true )
|
1665 |
+
) {
|
1666 |
+
// Register customizer upsell.
|
1667 |
+
add_action( 'customize_register', array( &$this, '_customizer_register' ) );
|
1668 |
+
}
|
1669 |
+
|
1670 |
+
add_action( 'admin_init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
|
1671 |
+
|
1672 |
+
if ( $this->is_theme() && ! $this->is_migration() ) {
|
1673 |
+
add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
|
1674 |
+
}
|
1675 |
+
|
1676 |
+
add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
|
1677 |
+
add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
|
1678 |
+
add_action( 'admin_init', array( &$this, '_add_beta_mode_update_handler' ) );
|
1679 |
+
add_action( 'admin_init', array( &$this, '_add_user_change_option' ) );
|
1680 |
+
|
1681 |
+
$this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
|
1682 |
+
$this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
|
1683 |
+
$this->add_ajax_action( 'set_data_debug_mode', array( &$this, '_set_data_debug_mode' ) );
|
1684 |
+
$this->add_ajax_action( 'toggle_whitelabel_mode', array( &$this, '_toggle_whitelabel_mode_ajax_handler' ) );
|
1685 |
+
|
1686 |
+
if ( $this->_is_network_active && fs_is_network_admin() ) {
|
1687 |
+
$this->add_ajax_action( 'network_activate', array( &$this, '_network_activate_ajax_action' ) );
|
1688 |
+
}
|
1689 |
+
|
1690 |
+
$this->add_ajax_action( 'install_premium_version', array(
|
1691 |
+
&$this,
|
1692 |
+
'_install_premium_version_ajax_action'
|
1693 |
+
) );
|
1694 |
+
|
1695 |
+
$this->add_ajax_action( 'submit_affiliate_application', array( &$this, '_submit_affiliate_application' ) );
|
1696 |
+
|
1697 |
+
$this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
|
1698 |
+
|
1699 |
+
$this->add_action( 'sdk_version_update', array( &$this, '_sdk_version_update' ), WP_FS__DEFAULT_PRIORITY, 2 );
|
1700 |
+
|
1701 |
+
$this->add_action(
|
1702 |
+
'plugin_version_update',
|
1703 |
+
array( &$this, '_after_version_update' ),
|
1704 |
+
WP_FS__DEFAULT_PRIORITY,
|
1705 |
+
2
|
1706 |
+
);
|
1707 |
+
$this->add_filter( 'after_code_type_change', array( &$this, '_after_code_type_change' ) );
|
1708 |
+
|
1709 |
+
add_action( 'admin_init', array( &$this, '_add_trial_notice' ) );
|
1710 |
+
add_action( 'admin_init', array( &$this, '_add_affiliate_program_notice' ) );
|
1711 |
+
add_action( 'admin_enqueue_scripts', array( &$this, '_enqueue_common_css' ) );
|
1712 |
+
|
1713 |
+
/**
|
1714 |
+
* Handle request to reset anonymous mode for `get_reconnect_url()`.
|
1715 |
+
*
|
1716 |
+
* @author Vova Feldman (@svovaf)
|
1717 |
+
* @since 1.2.1.5
|
1718 |
+
*/
|
1719 |
+
if ( fs_request_is_action( 'reset_anonymous_mode' ) &&
|
1720 |
+
$this->get_unique_affix() === fs_request_get( 'fs_unique_affix' )
|
1721 |
+
) {
|
1722 |
+
add_action( 'admin_init', array( &$this, 'connect_again' ) );
|
1723 |
+
}
|
1724 |
+
}
|
1725 |
+
|
1726 |
+
/**
|
1727 |
+
* Register the required hooks right after the settings parse is completed.
|
1728 |
+
*
|
1729 |
+
* @author Vova Feldman (@svovaf)
|
1730 |
+
* @since 2.3.1
|
1731 |
+
*/
|
1732 |
+
private function register_after_settings_parse_hooks() {
|
1733 |
+
if ( is_admin() &&
|
1734 |
+
$this->is_theme() &&
|
1735 |
+
$this->is_premium() &&
|
1736 |
+
! $this->has_active_valid_license()
|
1737 |
+
) {
|
1738 |
+
$this->add_ajax_action(
|
1739 |
+
'delete_theme_update_data',
|
1740 |
+
array( &$this, '_delete_theme_update_data_action' )
|
1741 |
+
);
|
1742 |
+
}
|
1743 |
+
|
1744 |
+
if ( $this->show_settings_with_tabs() ) {
|
1745 |
+
/**
|
1746 |
+
* Include the required hooks to capture the theme settings' page tabs
|
1747 |
+
* and cache them.
|
1748 |
+
*
|
1749 |
+
* @author Vova Feldman (@svovaf)
|
1750 |
+
* @since 1.2.2.7
|
1751 |
+
*/
|
1752 |
+
if ( ! $this->_cache->has_valid( 'tabs' ) ) {
|
1753 |
+
add_action( 'admin_footer', array( &$this, '_tabs_capture' ) );
|
1754 |
+
// Add license activation AJAX callback.
|
1755 |
+
$this->add_ajax_action( 'store_tabs', array( &$this, '_store_tabs_ajax_action' ) );
|
1756 |
+
|
1757 |
+
add_action( 'admin_enqueue_scripts', array( &$this, '_store_tabs_styles' ), 9999999 );
|
1758 |
+
}
|
1759 |
+
|
1760 |
+
add_action(
|
1761 |
+
'admin_footer',
|
1762 |
+
array( &$this, '_add_freemius_tabs' ),
|
1763 |
+
/**
|
1764 |
+
* The tabs JS code must be executed after the tabs capture logic (_tabs_capture()).
|
1765 |
+
* That's why the priority is 11 while the tabs capture logic is added
|
1766 |
+
* with priority 10.
|
1767 |
+
*
|
1768 |
+
* @author Vova Feldman (@svovaf)
|
1769 |
+
*/
|
1770 |
+
11
|
1771 |
+
);
|
1772 |
+
}
|
1773 |
+
|
1774 |
+
if ( ! self::is_ajax() ) {
|
1775 |
+
if ( ! $this->is_addon() || $this->is_only_premium() ) {
|
1776 |
+
add_action(
|
1777 |
+
( $this->_is_network_active && fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu',
|
1778 |
+
array( &$this, '_prepare_admin_menu' ),
|
1779 |
+
WP_FS__LOWEST_PRIORITY
|
1780 |
+
);
|
1781 |
+
}
|
1782 |
+
}
|
1783 |
+
}
|
1784 |
+
|
1785 |
+
/**
|
1786 |
+
* Makes Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php) so that
|
1787 |
+
* they won't interfere with the .org plugins' functionalities on that page (e.g. updating of a .org plugin).
|
1788 |
+
*
|
1789 |
+
* @author Leo Fajardo (@leorw)
|
1790 |
+
* @since 2.2.3
|
1791 |
+
*
|
1792 |
+
* @param object $updates
|
1793 |
+
* @param string|null $transient
|
1794 |
+
*
|
1795 |
+
* @return object
|
1796 |
+
*/
|
1797 |
+
static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
|
1798 |
+
if ( is_object( $updates ) && isset( $updates->response ) ) {
|
1799 |
+
foreach ( $updates->response as $file => $plugin ) {
|
1800 |
+
if ( isset( $plugin->package ) && false !== strpos( $plugin->package, 'api.freemius' ) ) {
|
1801 |
+
unset( $updates->response[ $file ] );
|
1802 |
+
}
|
1803 |
+
}
|
1804 |
+
}
|
1805 |
+
|
1806 |
+
return $updates;
|
1807 |
+
}
|
1808 |
+
|
1809 |
+
/**
|
1810 |
+
* Prepends the `fs_allow_updater_and_dialog` param to the plugin information URLs to tell the SDK to handle
|
1811 |
+
* the information that is shown on the plugin details dialog that is shown when the relevant link is clicked.
|
1812 |
+
*
|
1813 |
+
* @author Leo Fajardo (@leorw)
|
1814 |
+
* @since 2.2.3
|
1815 |
+
*
|
1816 |
+
* @return string
|
1817 |
+
*/
|
1818 |
+
static function _prepend_fs_allow_updater_and_dialog_flag_url_param() {
|
1819 |
+
$slug_basename_map = array();
|
1820 |
+
foreach ( self::$_instances as $instance ) {
|
1821 |
+
if ( ! $instance->is_plugin() ) {
|
1822 |
+
continue;
|
1823 |
+
}
|
1824 |
+
|
1825 |
+
$slug_basename_map[ $instance->get_slug() ] = $instance->premium_plugin_basename();
|
1826 |
+
}
|
1827 |
+
?>
|
1828 |
+
<script type="text/javascript">
|
1829 |
+
(function( $ ) {
|
1830 |
+
var slugBasenameMap = <?php echo json_encode( $slug_basename_map ) ?>;
|
1831 |
+
for ( var slug in slugBasenameMap ) {
|
1832 |
+
var basename = slugBasenameMap[ slug ];
|
1833 |
+
|
1834 |
+
// Try to get the plugin rows if on the "Plugins" page.
|
1835 |
+
var $pluginRows = $( '.wp-list-table.plugins tr[data-plugin="' + basename + '"]');
|
1836 |
+
|
1837 |
+
if ( 0 === $pluginRows.length ) {
|
1838 |
+
// Try to get the plugin rows if on the "Updates" page.
|
1839 |
+
var $pluginCheckbox = $( '#update-plugins-table input[type="checkbox"][value="' + basename + '"]' );
|
1840 |
+
if ( 0 !== $pluginCheckbox.length ) {
|
1841 |
+
$pluginRows = $pluginCheckbox.parents( 'tr:first' );
|
1842 |
+
}
|
1843 |
+
}
|
1844 |
+
|
1845 |
+
if ( 0 === $pluginRows.length ) {
|
1846 |
+
// No plugin rows found.
|
1847 |
+
continue;
|
1848 |
+
}
|
1849 |
+
|
1850 |
+
// Find the "View details" links and add the `fs_allow_updater_and_dialog` param to the URL.
|
1851 |
+
$pluginRows.find( 'a[href*="plugin-install.php?tab=plugin-information"]' ).each(function() {
|
1852 |
+
var $this = $( this ),
|
1853 |
+
href = $this.attr( 'href' ).replace( '?tab=', '?fs_allow_updater_and_dialog=true&tab=');
|
1854 |
+
|
1855 |
+
$this.attr( 'href', href );
|
1856 |
+
});
|
1857 |
+
}
|
1858 |
+
})( jQuery );
|
1859 |
+
</script>
|
1860 |
+
<?php
|
1861 |
+
}
|
1862 |
+
|
1863 |
+
/**
|
1864 |
+
* @author Leo Fajardo (@leorw)
|
1865 |
+
* @since 2.3.0
|
1866 |
+
*/
|
1867 |
+
static function _maybe_add_beta_label_styles() {
|
1868 |
+
$has_any_beta_version = false;
|
1869 |
+
|
1870 |
+
foreach ( self::$_instances as $instance ) {
|
1871 |
+
if ( $instance->is_beta() ) {
|
1872 |
+
$has_any_beta_version = true;
|
1873 |
+
break;
|
1874 |
+
}
|
1875 |
+
}
|
1876 |
+
|
1877 |
+
if ( $has_any_beta_version ) {
|
1878 |
+
fs_enqueue_local_style( 'fs_plugins', '/admin/plugins.css' );
|
1879 |
+
}
|
1880 |
+
}
|
1881 |
+
|
1882 |
+
/**
|
1883 |
+
* @author Leo Fajardo (@leorw)
|
1884 |
+
* @since 2.3.0
|
1885 |
+
*/
|
1886 |
+
static function _maybe_add_beta_label_to_plugins_and_handle_confirmation() {
|
1887 |
+
$beta_data = array();
|
1888 |
+
|
1889 |
+
foreach ( self::$_instances as $instance ) {
|
1890 |
+
if ( ! $instance->is_premium() ) {
|
1891 |
+
continue;
|
1892 |
+
}
|
1893 |
+
|
1894 |
+
/**
|
1895 |
+
* If there's an available beta version update, a confirmation message will be shown when the
|
1896 |
+
* "Update now" link on the "Plugins" or "Themes" page is clicked.
|
1897 |
+
*/
|
1898 |
+
$has_beta_update = $instance->has_beta_update();
|
1899 |
+
|
1900 |
+
$is_beta = (
|
1901 |
+
// The "Beta" label is added separately for themes.
|
1902 |
+
$instance->is_plugin() &&
|
1903 |
+
$instance->is_beta()
|
1904 |
+
);
|
1905 |
+
|
1906 |
+
if ( ! $is_beta && ! $has_beta_update ) {
|
1907 |
+
continue;
|
1908 |
+
}
|
1909 |
+
|
1910 |
+
$beta_data[ $instance->get_plugin_basename() ] = array( 'is_installed_version_beta' => $is_beta );
|
1911 |
+
|
1912 |
+
if ( ! $has_beta_update ) {
|
1913 |
+
continue;
|
1914 |
+
}
|
1915 |
+
|
1916 |
+
$beta_data[ $instance->get_plugin_basename() ]['beta_version_update_confirmation_message'] = sprintf(
|
1917 |
+
'%s %s',
|
1918 |
+
sprintf(
|
1919 |
+
fs_esc_attr_inline(
|
1920 |
+
'An update to a Beta version will replace your installed version of %s with the latest Beta release - use with caution, and not on production sites. You have been warned.',
|
1921 |
+
'beta-version-update-caution',
|
1922 |
+
$instance->get_slug()
|
1923 |
+
),
|
1924 |
+
$instance->get_plugin_title()
|
1925 |
+
),
|
1926 |
+
fs_esc_attr_inline( 'Would you like to proceed with the update?', 'update-confirmation', $instance->get_slug() )
|
1927 |
+
);
|
1928 |
+
}
|
1929 |
+
|
1930 |
+
if ( empty( $beta_data ) ) {
|
1931 |
+
return;
|
1932 |
+
}
|
1933 |
+
?>
|
1934 |
+
<script type="text/javascript">
|
1935 |
+
( function( $ ) {
|
1936 |
+
var betaData = <?php echo json_encode( $beta_data ) ?>;
|
1937 |
+
|
1938 |
+
for ( var pluginBasename in betaData ) {
|
1939 |
+
if ( ! betaData.hasOwnProperty( pluginBasename ) ) {
|
1940 |
+
continue;
|
1941 |
+
}
|
1942 |
+
|
1943 |
+
if ( ! betaData[ pluginBasename ].is_installed_version_beta ) {
|
1944 |
+
continue;
|
1945 |
+
}
|
1946 |
+
|
1947 |
+
var $parentContainer = $( '.wp-list-table.plugins tr[data-plugin="' + pluginBasename + '"]' );
|
1948 |
+
if ( 0 === $parentContainer.length ) {
|
1949 |
+
continue;
|
1950 |
+
}
|
1951 |
+
|
1952 |
+
$parentContainer.find( '.plugin-title > strong:first-child').append(
|
1953 |
+
'<span class="fs-tag fs-info"><?php fs_esc_js_echo_inline( 'Beta', 'beta' ) ?></span>'
|
1954 |
+
);
|
1955 |
+
}
|
1956 |
+
|
1957 |
+
setTimeout( function() {
|
1958 |
+
// Wait a little bit before adding the event handler, otherwise, it will be overridden by the core WP logic.
|
1959 |
+
$( '.plugins .update-message .update-link, .themes .theme .update-message' ).on( 'click', function() {
|
1960 |
+
var $parentContainer = $( this ).parents( 'tr:first' );
|
1961 |
+
pluginBasename = ( 0 !== $parentContainer.length ) ?
|
1962 |
+
$parentContainer.data( 'plugin' ) :
|
1963 |
+
$( this ).parents( '.theme:first' ).data( 'slug' );
|
1964 |
+
|
1965 |
+
if (
|
1966 |
+
betaData[ pluginBasename ] &&
|
1967 |
+
betaData[ pluginBasename ].beta_version_update_confirmation_message &&
|
1968 |
+
! confirm( betaData[ pluginBasename ].beta_version_update_confirmation_message )
|
1969 |
+
) {
|
1970 |
+
return false;
|
1971 |
+
}
|
1972 |
+
} );
|
1973 |
+
}, 20 );
|
1974 |
+
} )( jQuery );
|
1975 |
+
</script>
|
1976 |
+
<?php
|
1977 |
+
}
|
1978 |
+
|
1979 |
+
/**
|
1980 |
+
* Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
|
1981 |
+
* could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
|
1982 |
+
* plugin will trigger inclusion of the free or premium version and if one of them is active during the
|
1983 |
+
* uninstallation, a fatal error may occur in case the plugin's class or functions are already defined.
|
1984 |
+
*
|
1985 |
+
* @author Leo Fajardo (@leorw)
|
1986 |
+
*
|
1987 |
+
* @since 1.2.0
|
1988 |
+
*/
|
1989 |
+
private function unregister_uninstall_hook() {
|
1990 |
+
$uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
|
1991 |
+
unset( $uninstallable_plugins[ $this->_free_plugin_basename ] );
|
1992 |
+
unset( $uninstallable_plugins[ $this->premium_plugin_basename() ] );
|
1993 |
+
|
1994 |
+
update_option( 'uninstall_plugins', $uninstallable_plugins );
|
1995 |
+
}
|
1996 |
+
|
1997 |
+
/**
|
1998 |
+
* @since 1.2.0 Invalidate module's main file cache, otherwise, FS_Plugin_Updater will not fetch updates.
|
1999 |
+
*
|
2000 |
+
* @param bool $store_prev_path
|
2001 |
+
*/
|
2002 |
+
private function clear_module_main_file_cache( $store_prev_path = true ) {
|
2003 |
+
if ( ! isset( $this->_storage->plugin_main_file ) ||
|
2004 |
+
empty( $this->_storage->plugin_main_file->path )
|
2005 |
+
) {
|
2006 |
+
return;
|
2007 |
+
}
|
2008 |
+
|
2009 |
+
if ( ! $store_prev_path ) {
|
2010 |
+
/**
|
2011 |
+
* Storing the previous path is not needed when clearing the cache after an SDK version update since
|
2012 |
+
* the main purpose of the cache clearing in that event is to correct a wrong plugin main file path
|
2013 |
+
* which causes data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
|
2014 |
+
*
|
2015 |
+
* @author Leo Fajardo (@leorw)
|
2016 |
+
* @since 2.2.1
|
2017 |
+
*/
|
2018 |
+
unset( $this->_storage->plugin_main_file->path );
|
2019 |
+
} else {
|
2020 |
+
$plugin_main_file = clone $this->_storage->plugin_main_file;
|
2021 |
+
|
2022 |
+
// Store cached path (2nd layer cache).
|
2023 |
+
$plugin_main_file->prev_path = $plugin_main_file->path;
|
2024 |
+
|
2025 |
+
// Clear cached path.
|
2026 |
+
unset( $plugin_main_file->path );
|
2027 |
+
|
2028 |
+
$this->_storage->plugin_main_file = $plugin_main_file;
|
2029 |
+
}
|
2030 |
+
|
2031 |
+
/**
|
2032 |
+
* Clear global cached path.
|
2033 |
+
*
|
2034 |
+
* @author Leo Fajardo (@leorw)
|
2035 |
+
* @since 1.2.2
|
2036 |
+
*/
|
2037 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map' );
|
2038 |
+
unset( $id_slug_type_path_map[ $this->_module_id ]['path'] );
|
2039 |
+
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
2040 |
+
}
|
2041 |
+
|
2042 |
+
/**
|
2043 |
+
* @author Leo Fajardo (@leorw)
|
2044 |
+
* @since 2.0.0
|
2045 |
+
*/
|
2046 |
+
function _hook_action_links_and_register_account_hooks() {
|
2047 |
+
if ( $this->is_migration() ) {
|
2048 |
+
return;
|
2049 |
+
}
|
2050 |
+
|
2051 |
+
$this->_add_tracking_links();
|
2052 |
+
|
2053 |
+
if ( self::is_plugins_page() && $this->is_plugin() ) {
|
2054 |
+
$this->hook_plugin_action_links();
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
$this->_register_account_hooks();
|
2058 |
+
}
|
2059 |
+
|
2060 |
+
/**
|
2061 |
+
* @author Vova Feldman (@svovaf)
|
2062 |
+
* @since 1.0.9
|
2063 |
+
*/
|
2064 |
+
private function _register_account_hooks() {
|
2065 |
+
if ( ! is_admin() ) {
|
2066 |
+
return;
|
2067 |
+
}
|
2068 |
+
|
2069 |
+
/**
|
2070 |
+
* Always show the deactivation feedback form since we added
|
2071 |
+
* automatic free version deactivation upon premium code activation.
|
2072 |
+
*
|
2073 |
+
* @since 1.2.1.6
|
2074 |
+
*/
|
2075 |
+
$this->add_ajax_action(
|
2076 |
+
'submit_uninstall_reason',
|
2077 |
+
array( &$this, '_submit_uninstall_reason_action' )
|
2078 |
+
);
|
2079 |
+
|
2080 |
+
$this->add_ajax_action(
|
2081 |
+
'cancel_subscription_or_trial',
|
2082 |
+
array( &$this, 'cancel_subscription_or_trial_ajax_action' )
|
2083 |
+
);
|
2084 |
+
|
2085 |
+
if ( ! $this->is_addon() || $this->is_parent_plugin_installed() ) {
|
2086 |
+
if ( ( $this->is_plugin() && self::is_plugins_page() ) ||
|
2087 |
+
( $this->is_theme() && self::is_themes_page() )
|
2088 |
+
) {
|
2089 |
+
add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
|
2090 |
+
}
|
2091 |
+
}
|
2092 |
+
}
|
2093 |
+
|
2094 |
+
/**
|
2095 |
+
* Leverage backtrace to find caller plugin file path.
|
2096 |
+
*
|
2097 |
+
* @author Vova Feldman (@svovaf)
|
2098 |
+
* @since 1.0.6
|
2099 |
+
*
|
2100 |
+
* @param bool $is_init Is initiation sequence.
|
2101 |
+
*
|
2102 |
+
* @return string
|
2103 |
+
*/
|
2104 |
+
private function _find_caller_plugin_file( $is_init = false ) {
|
2105 |
+
// Try to load the cached value of the file path.
|
2106 |
+
if ( isset( $this->_storage->plugin_main_file ) ) {
|
2107 |
+
$plugin_main_file = $this->_storage->plugin_main_file;
|
2108 |
+
if ( ! empty( $plugin_main_file->path ) ) {
|
2109 |
+
$absolute_path = $this->get_absolute_path( $plugin_main_file->path );
|
2110 |
+
if ( file_exists( $absolute_path ) ) {
|
2111 |
+
return $absolute_path;
|
2112 |
+
}
|
2113 |
+
}
|
2114 |
+
}
|
2115 |
+
|
2116 |
+
/**
|
2117 |
+
* @since 1.2.1
|
2118 |
+
*
|
2119 |
+
* `clear_module_main_file_cache()` is clearing the plugin's cached path on
|
2120 |
+
* deactivation. Therefore, if any plugin/theme was initiating `Freemius`
|
2121 |
+
* with that plugin's slug, it was overriding the empty plugin path with a wrong path.
|
2122 |
+
*
|
2123 |
+
* So, we've added a special mechanism with a 2nd layer of cache that uses `prev_path`
|
2124 |
+
* when the class instantiator isn't the module.
|
2125 |
+
*/
|
2126 |
+
if ( ! $is_init ) {
|
2127 |
+
// Fetch prev path cache.
|
2128 |
+
if ( isset( $this->_storage->plugin_main_file ) &&
|
2129 |
+
! empty( $this->_storage->plugin_main_file->prev_path )
|
2130 |
+
) {
|
2131 |
+
$absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
|
2132 |
+
if ( file_exists( $absolute_path ) ) {
|
2133 |
+
return $absolute_path;
|
2134 |
+
}
|
2135 |
+
}
|
2136 |
+
|
2137 |
+
wp_die(
|
2138 |
+
$this->get_text_inline( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.', 'failed-finding-main-path' ) .
|
2139 |
+
" Module: {$this->_slug}; SDK: " . WP_FS__SDK_VERSION . ";",
|
2140 |
+
$this->get_text_inline( 'Error', 'error' ),
|
2141 |
+
array( 'back_link' => true )
|
2142 |
+
);
|
2143 |
+
}
|
2144 |
+
|
2145 |
+
/**
|
2146 |
+
* @since 1.2.1
|
2147 |
+
*
|
2148 |
+
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
2149 |
+
*/
|
2150 |
+
// Find caller module.
|
2151 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
2152 |
+
$this->_storage->plugin_main_file = (object) array(
|
2153 |
+
'path' => $id_slug_type_path_map[ $this->_module_id ]['path'],
|
2154 |
+
);
|
2155 |
+
|
2156 |
+
return $this->get_absolute_path( $id_slug_type_path_map[ $this->_module_id ]['path'] );
|
2157 |
+
}
|
2158 |
+
|
2159 |
+
/**
|
2160 |
+
* @author Leo Fajardo (@leorw)
|
2161 |
+
* @since 1.2.3
|
2162 |
+
*
|
2163 |
+
* @param string $path
|
2164 |
+
*
|
2165 |
+
* @return string
|
2166 |
+
*/
|
2167 |
+
private function get_relative_path( $path ) {
|
2168 |
+
$module_root_dir = $this->get_module_root_dir_path();
|
2169 |
+
if ( 0 === strpos( $path, $module_root_dir ) ) {
|
2170 |
+
$path = substr( $path, strlen( $module_root_dir ) );
|
2171 |
+
}
|
2172 |
+
|
2173 |
+
return $path;
|
2174 |
+
}
|
2175 |
+
|
2176 |
+
/**
|
2177 |
+
* @author Leo Fajardo (@leorw)
|
2178 |
+
* @since 1.2.3
|
2179 |
+
*
|
2180 |
+
* @param string $path
|
2181 |
+
* @param string|bool $module_type
|
2182 |
+
*
|
2183 |
+
* @return string
|
2184 |
+
*/
|
2185 |
+
private function get_absolute_path( $path, $module_type = false ) {
|
2186 |
+
$module_root_dir = $this->get_module_root_dir_path( $module_type );
|
2187 |
+
if ( 0 !== strpos( $path, $module_root_dir ) ) {
|
2188 |
+
$path = fs_normalize_path( $module_root_dir . $path );
|
2189 |
+
}
|
2190 |
+
|
2191 |
+
return $path;
|
2192 |
+
}
|
2193 |
+
|
2194 |
+
/**
|
2195 |
+
* @author Leo Fajardo (@leorw)
|
2196 |
+
* @since 1.2.3
|
2197 |
+
*
|
2198 |
+
* @param string|bool $module_type
|
2199 |
+
*
|
2200 |
+
* @return string
|
2201 |
+
*/
|
2202 |
+
private function get_module_root_dir_path( $module_type = false ) {
|
2203 |
+
$is_plugin = empty( $module_type ) ?
|
2204 |
+
$this->is_plugin() :
|
2205 |
+
( WP_FS__MODULE_TYPE_PLUGIN === $module_type );
|
2206 |
+
|
2207 |
+
return fs_normalize_path( trailingslashit( $is_plugin ?
|
2208 |
+
WP_PLUGIN_DIR :
|
2209 |
+
get_theme_root( get_stylesheet() ) ) );
|
2210 |
+
}
|
2211 |
+
|
2212 |
+
/**
|
2213 |
+
* @author Leo Fajardo (@leorw)
|
2214 |
+
*
|
2215 |
+
* @param number $module_id
|
2216 |
+
* @param string $slug
|
2217 |
+
*
|
2218 |
+
* @since 1.2.2
|
2219 |
+
*/
|
2220 |
+
private function store_id_slug_type_path_map( $module_id, $slug ) {
|
2221 |
+
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
2222 |
+
|
2223 |
+
$store_option = false;
|
2224 |
+
|
2225 |
+
if ( ! isset( $id_slug_type_path_map[ $module_id ] ) ) {
|
2226 |
+
$id_slug_type_path_map[ $module_id ] = array(
|
2227 |
+
'slug' => $slug
|
2228 |
+
);
|
2229 |
+
|
2230 |
+
$store_option = true;
|
2231 |
+
} else if (
|
2232 |
+
isset( $id_slug_type_path_map[ $module_id ]['slug'] ) &&
|
2233 |
+
$slug !== $id_slug_type_path_map[ $module_id ]['slug']
|
2234 |
+
) {
|
2235 |
+
$id_slug_type_path_map[ $module_id ]['slug'] = $slug;
|
2236 |
+
$store_option = true;
|
2237 |
+
}
|
2238 |
+
|
2239 |
+
if ( empty( $id_slug_type_path_map[ $module_id ]['path'] ) ||
|
2240 |
+
/**
|
2241 |
+
* This verification is for cases when suddenly the same module
|
2242 |
+
* is installed but with a different folder name.
|
2243 |
+
*
|
2244 |
+
* @author Vova Feldman (@svovaf)
|
2245 |
+
* @since 1.2.3
|
2246 |
+
*/
|
2247 |
+
! file_exists( $this->get_absolute_path(
|
2248 |
+
$id_slug_type_path_map[ $module_id ]['path'],
|
2249 |
+
$id_slug_type_path_map[ $module_id ]['type']
|
2250 |
+
) )
|
2251 |
+
) {
|
2252 |
+
$caller_main_file_and_type = $this->get_caller_main_file_and_type();
|
2253 |
+
|
2254 |
+
$id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
|
2255 |
+
$id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
|
2256 |
+
|
2257 |
+
$store_option = true;
|
2258 |
+
}
|
2259 |
+
|
2260 |
+
if ( $store_option ) {
|
2261 |
+
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
2262 |
+
}
|
2263 |
+
}
|
2264 |
+
|
2265 |
+
/**
|
2266 |
+
* Identifies the caller type: plugin or theme.
|
2267 |
+
*
|
2268 |
+
* @author Leo Fajardo (@leorw)
|
2269 |
+
* @since 1.2.2
|
2270 |
+
*
|
2271 |
+
* @author Vova Feldman (@svovaf)
|
2272 |
+
* @since 1.2.2.3 Find the earliest module in the call stack that calls to the SDK. This fix is for cases when
|
2273 |
+
* add-ons are relying on loading the SDK from the parent module, and also allows themes including the
|
2274 |
+
* SDK an internal file instead of directly from functions.php.
|
2275 |
+
* @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
|
2276 |
+
*/
|
2277 |
+
private function get_caller_main_file_and_type() {
|
2278 |
+
self::require_plugin_essentials();
|
2279 |
+
|
2280 |
+
$all_plugins = fs_get_plugins( true );
|
2281 |
+
$all_plugins_paths = array();
|
2282 |
+
|
2283 |
+
// Get active plugin's main files real full names (might be symlinks).
|
2284 |
+
foreach ( $all_plugins as $relative_path => $data ) {
|
2285 |
+
if ( false === strpos( fs_normalize_path( $relative_path ), '/' ) ) {
|
2286 |
+
/**
|
2287 |
+
* Ignore plugins that don't have a folder (e.g. Hello Dolly) since they
|
2288 |
+
* can't really include the SDK.
|
2289 |
+
*
|
2290 |
+
* @author Vova Feldman
|
2291 |
+
* @since 1.2.1.7
|
2292 |
+
*/
|
2293 |
+
continue;
|
2294 |
+
}
|
2295 |
+
|
2296 |
+
$all_plugins_paths[] = fs_normalize_path( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) );
|
2297 |
+
}
|
2298 |
+
|
2299 |
+
$caller_file_candidate = false;
|
2300 |
+
$caller_map = array();
|
2301 |
+
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
2302 |
+
$themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
|
2303 |
+
$plugin_dir_to_skip = false;
|
2304 |
+
|
2305 |
+
for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
|
2306 |
+
if ( empty( $bt[ $i ]['file'] ) ) {
|
2307 |
+
continue;
|
2308 |
+
}
|
2309 |
+
|
2310 |
+
if ( $i > 1 && ! empty( $bt[ $i - 1 ]['file'] ) && $bt[ $i ]['file'] === $bt[ $i - 1 ]['file'] ) {
|
2311 |
+
// If file same as the prev file in the stack, skip it.
|
2312 |
+
continue;
|
2313 |
+
}
|
2314 |
+
|
2315 |
+
if ( ! empty( $bt[ $i ]['function'] ) && in_array( $bt[ $i ]['function'], array(
|
2316 |
+
'do_action',
|
2317 |
+
'apply_filter',
|
2318 |
+
// The string split is stupid, but otherwise, theme check
|
2319 |
+
// throws info notices.
|
2320 |
+
'requir' . 'e_once',
|
2321 |
+
'requir' . 'e',
|
2322 |
+
'includ' . 'e_once',
|
2323 |
+
'includ' . 'e',
|
2324 |
+
'install_and_activate_plugin',
|
2325 |
+
'try_activate_plugin',
|
2326 |
+
'activate_plugin'
|
2327 |
+
) )
|
2328 |
+
) {
|
2329 |
+
if ( 'activate_plugin' === $bt[ $i ]['function'] ) {
|
2330 |
+
/**
|
2331 |
+
* Store the directory of the activator plugin so that any other file that starts with it
|
2332 |
+
* cannot be mistakenly chosen as a candidate caller file.
|
2333 |
+
*
|
2334 |
+
* @author Leo Fajardo
|
2335 |
+
*
|
2336 |
+
* @since 2.3.0
|
2337 |
+
*/
|
2338 |
+
$caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
|
2339 |
+
|
2340 |
+
foreach ( $all_plugins_paths as $plugin_path ) {
|
2341 |
+
$plugin_dir = fs_normalize_path( dirname( $plugin_path ) . '/' );
|
2342 |
+
if ( false !== strpos( $caller_file_path, $plugin_dir ) ) {
|
2343 |
+
$plugin_dir_to_skip = $plugin_dir;
|
2344 |
+
|
2345 |
+
break;
|
2346 |
+
}
|
2347 |
+
}
|
2348 |
+
}
|
2349 |
+
|
2350 |
+
// Ignore call stack hooks and files inclusion.
|
2351 |
+
continue;
|
2352 |
+
}
|
2353 |
+
|
2354 |
+
$caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
|
2355 |
+
|
2356 |
+
if ( ! empty( $plugin_dir_to_skip ) ) {
|
2357 |
+
/**
|
2358 |
+
* Skip if it's an activator plugin file to avoid mistakenly choosing it as a candidate caller file.
|
2359 |
+
*
|
2360 |
+
* @author Leo Fajardo
|
2361 |
+
*
|
2362 |
+
* @since 2.3.0
|
2363 |
+
*/
|
2364 |
+
if ( 0 === strpos( $caller_file_path, $plugin_dir_to_skip ) ) {
|
2365 |
+
continue;
|
2366 |
+
}
|
2367 |
+
}
|
2368 |
+
|
2369 |
+
if ( 'functions.php' === basename( $caller_file_path ) ) {
|
2370 |
+
/**
|
2371 |
+
* 1. Assumes that theme's starting execution file is functions.php.
|
2372 |
+
* 2. This complex logic fixes symlink issues (e.g. with Vargant).
|
2373 |
+
*
|
2374 |
+
* @author Vova Feldman (@svovaf)
|
2375 |
+
* @since 1.2.2.5
|
2376 |
+
*/
|
2377 |
+
|
2378 |
+
if ( $caller_file_path == fs_normalize_path( realpath( trailingslashit( $themes_dir ) . basename( dirname( $caller_file_path ) ) . '/' . basename( $caller_file_path ) ) ) ) {
|
2379 |
+
$module_type = WP_FS__MODULE_TYPE_THEME;
|
2380 |
+
|
2381 |
+
/**
|
2382 |
+
* Relative path of the theme, e.g.:
|
2383 |
+
* `my-theme/functions.php`
|
2384 |
+
*
|
2385 |
+
* @author Leo Fajardo (@leorw)
|
2386 |
+
*/
|
2387 |
+
$caller_file_candidate = basename( dirname( $caller_file_path ) ) .
|
2388 |
+
'/' .
|
2389 |
+
basename( $caller_file_path );
|
2390 |
+
|
2391 |
+
continue;
|
2392 |
+
}
|
2393 |
+
}
|
2394 |
+
|
2395 |
+
$caller_file_hash = md5( $caller_file_path );
|
2396 |
+
|
2397 |
+
if ( ! isset( $caller_map[ $caller_file_hash ] ) ) {
|
2398 |
+
foreach ( $all_plugins_paths as $plugin_path ) {
|
2399 |
+
if ( empty( $plugin_path ) ) {
|
2400 |
+
continue;
|
2401 |
+
}
|
2402 |
+
|
2403 |
+
if ( false !== strpos( $caller_file_path, fs_normalize_path( dirname( $plugin_path ) . '/' ) ) ) {
|
2404 |
+
$caller_map[ $caller_file_hash ] = fs_normalize_path( $plugin_path );
|
2405 |
+
break;
|
2406 |
+
}
|
2407 |
+
}
|
2408 |
+
}
|
2409 |
+
|
2410 |
+
if ( isset( $caller_map[ $caller_file_hash ] ) ) {
|
2411 |
+
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
2412 |
+
$caller_file_candidate = plugin_basename( $caller_map[ $caller_file_hash ] );
|
2413 |
+
}
|
2414 |
+
}
|
2415 |
+
|
2416 |
+
return (object) array(
|
2417 |
+
'module_type' => $module_type,
|
2418 |
+
'path' => $caller_file_candidate
|
2419 |
+
);
|
2420 |
+
}
|
2421 |
+
|
2422 |
+
#----------------------------------------------------------------------------------
|
2423 |
+
#region Deactivation Feedback Form
|
2424 |
+
#----------------------------------------------------------------------------------
|
2425 |
+
|
2426 |
+
/**
|
2427 |
+
* Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
|
2428 |
+
* page.
|
2429 |
+
*
|
2430 |
+
* @author Vova Feldman (@svovaf)
|
2431 |
+
* @author Leo Fajardo (@leorw)
|
2432 |
+
*
|
2433 |
+
* @since 1.1.2
|
2434 |
+
*/
|
2435 |
+
function _add_deactivation_feedback_dialog_box() {
|
2436 |
+
$subscription_cancellation_dialog_box_template_params = $this->apply_filters( 'show_deactivation_subscription_cancellation', true ) ?
|
2437 |
+
$this->_get_subscription_cancellation_dialog_box_template_params() :
|
2438 |
+
array();
|
2439 |
+
|
2440 |
+
/**
|
2441 |
+
* @since 2.3.0 Developers can optionally hide the deactivation feedback form using the 'show_deactivation_feedback_form' filter.
|
2442 |
+
*/
|
2443 |
+
$show_deactivation_feedback_form = true;
|
2444 |
+
if ( $this->has_filter( 'show_deactivation_feedback_form' ) ) {
|
2445 |
+
$show_deactivation_feedback_form = $this->apply_filters( 'show_deactivation_feedback_form', true );
|
2446 |
+
} else if ( $this->is_addon() ) {
|
2447 |
+
/**
|
2448 |
+
* If the add-on's 'show_deactivation_feedback_form' is not set, try to inherit the value from the parent.
|
2449 |
+
*/
|
2450 |
+
$show_deactivation_feedback_form = $this->get_parent_instance()->apply_filters( 'show_deactivation_feedback_form', true );
|
2451 |
+
}
|
2452 |
+
|
2453 |
+
$uninstall_confirmation_message = $this->apply_filters( 'uninstall_confirmation_message', '' );
|
2454 |
+
|
2455 |
+
if (
|
2456 |
+
empty( $subscription_cancellation_dialog_box_template_params ) &&
|
2457 |
+
! $show_deactivation_feedback_form &&
|
2458 |
+
empty( $uninstall_confirmation_message )
|
2459 |
+
) {
|
2460 |
+
return;
|
2461 |
+
}
|
2462 |
+
|
2463 |
+
$vars = array( 'id' => $this->_module_id );
|
2464 |
+
|
2465 |
+
if ( $show_deactivation_feedback_form ) {
|
2466 |
+
/* Check the type of user:
|
2467 |
+
* 1. Long-term (long-term)
|
2468 |
+
* 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
|
2469 |
+
* 3. Short-term (short-term)
|
2470 |
+
*/
|
2471 |
+
$is_long_term_user = true;
|
2472 |
+
|
2473 |
+
// Check if the site is at least 2 days old.
|
2474 |
+
$time_installed = $this->_storage->install_timestamp;
|
2475 |
+
|
2476 |
+
// Difference in seconds.
|
2477 |
+
$date_diff = time() - $time_installed;
|
2478 |
+
|
2479 |
+
// Convert seconds to days.
|
2480 |
+
$date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
|
2481 |
+
|
2482 |
+
if ( $date_diff_days < 2 ) {
|
2483 |
+
$is_long_term_user = false;
|
2484 |
+
}
|
2485 |
+
|
2486 |
+
$is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
|
2487 |
+
|
2488 |
+
if ( $is_long_term_user ) {
|
2489 |
+
$user_type = 'long-term';
|
2490 |
+
} else {
|
2491 |
+
if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
|
2492 |
+
$user_type = 'non-registered-and-non-anonymous-short-term';
|
2493 |
+
} else {
|
2494 |
+
$user_type = 'short-term';
|
2495 |
+
}
|
2496 |
+
}
|
2497 |
+
|
2498 |
+
$uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
|
2499 |
+
|
2500 |
+
$vars['reasons'] = $uninstall_reasons;
|
2501 |
+
}
|
2502 |
+
|
2503 |
+
$vars['subscription_cancellation_dialog_box_template_params'] = &$subscription_cancellation_dialog_box_template_params;
|
2504 |
+
$vars['show_deactivation_feedback_form'] = $show_deactivation_feedback_form;
|
2505 |
+
$vars['uninstall_confirmation_message'] = $uninstall_confirmation_message;
|
2506 |
+
|
2507 |
+
/**
|
2508 |
+
* Load the HTML template for the deactivation feedback dialog box.
|
2509 |
+
*
|
2510 |
+
* @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
|
2511 |
+
*/
|
2512 |
+
fs_require_template( 'forms/deactivation/form.php', $vars );
|
2513 |
+
}
|
2514 |
+
|
2515 |
+
/**
|
2516 |
+
* @author Leo Fajardo (@leorw)
|
2517 |
+
* @since 1.1.2
|
2518 |
+
*
|
2519 |
+
* @param string $user_type
|
2520 |
+
*
|
2521 |
+
* @return array The uninstall reasons for the specified user type.
|
2522 |
+
*/
|
2523 |
+
function _get_uninstall_reasons( $user_type = 'long-term' ) {
|
2524 |
+
$module_type = $this->_module_type;
|
2525 |
+
|
2526 |
+
$internal_message_template_var = array(
|
2527 |
+
'id' => $this->_module_id
|
2528 |
+
);
|
2529 |
+
|
2530 |
+
$plan = $this->get_plan();
|
2531 |
+
|
2532 |
+
if ( $this->is_registered() && is_object( $plan ) && $plan->has_technical_support() ) {
|
2533 |
+
$contact_support_template = fs_get_template( 'forms/deactivation/contact.php', $internal_message_template_var );
|
2534 |
+
} else {
|
2535 |
+
$contact_support_template = '';
|
2536 |
+
}
|
2537 |
+
|
2538 |
+
$reason_found_better_plugin = array(
|
2539 |
+
'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
|
2540 |
+
'text' => sprintf( $this->get_text_inline( 'I found a better %s', 'reason-found-a-better-plugin' ), $module_type ),
|
2541 |
+
'input_type' => 'textfield',
|
2542 |
+
'input_placeholder' => sprintf( $this->get_text_inline( "What's the %s's name?", 'placeholder-plugin-name' ), $module_type ),
|
2543 |
+
);
|
2544 |
+
|
2545 |
+
$reason_temporary_deactivation = array(
|
2546 |
+
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
2547 |
+
'text' => sprintf(
|
2548 |
+
$this->get_text_inline( "It's a temporary %s. I'm just debugging an issue.", 'reason-temporary-x' ),
|
2549 |
+
strtolower( $this->is_plugin() ?
|
2550 |
+
$this->get_text_inline( 'Deactivation', 'deactivation' ) :
|
2551 |
+
$this->get_text_inline( 'Theme Switch', 'theme-switch' )
|
2552 |
+
)
|
2553 |
+
),
|
2554 |
+
'input_type' => '',
|
2555 |
+
'input_placeholder' => ''
|
2556 |
+
);
|
2557 |
+
|
2558 |
+
$reason_other = array(
|
2559 |
+
'id' => self::REASON_OTHER,
|
2560 |
+
'text' => $this->get_text_inline( 'Other', 'reason-other' ),
|
2561 |
+
'input_type' => 'textfield',
|
2562 |
+
'input_placeholder' => ''
|
2563 |
+
);
|
2564 |
+
|
2565 |
+
$long_term_user_reasons = array(
|
2566 |
+
array(
|
2567 |
+
'id' => self::REASON_NO_LONGER_NEEDED,
|
2568 |
+
'text' => sprintf( $this->get_text_inline( 'I no longer need the %s', 'reason-no-longer-needed' ), $module_type ),
|
2569 |
+
'input_type' => '',
|
2570 |
+
'input_placeholder' => ''
|
2571 |
+
),
|
2572 |
+
$reason_found_better_plugin,
|
2573 |
+
array(
|
2574 |
+
'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
|
2575 |
+
'text' => sprintf( $this->get_text_inline( 'I only needed the %s for a short period', 'reason-needed-for-a-short-period' ), $module_type ),
|
2576 |
+
'input_type' => '',
|
2577 |
+
'input_placeholder' => ''
|
2578 |
+
),
|
2579 |
+
array(
|
2580 |
+
'id' => self::REASON_BROKE_MY_SITE,
|
2581 |
+
'text' => sprintf( $this->get_text_inline( 'The %s broke my site', 'reason-broke-my-site' ), $module_type ),
|
2582 |
+
'input_type' => '',
|
2583 |
+
'input_placeholder' => '',
|
2584 |
+
'internal_message' => $contact_support_template
|
2585 |
+
),
|
2586 |
+
array(
|
2587 |
+
'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
|
2588 |
+
'text' => sprintf( $this->get_text_inline( 'The %s suddenly stopped working', 'reason-suddenly-stopped-working' ), $module_type ),
|
2589 |
+
'input_type' => '',
|
2590 |
+
'input_placeholder' => '',
|
2591 |
+
'internal_message' => $contact_support_template
|
2592 |
+
)
|
2593 |
+
);
|
2594 |
+
|
2595 |
+
if ( $this->is_paying() ) {
|
2596 |
+
$long_term_user_reasons[] = array(
|
2597 |
+
'id' => self::REASON_CANT_PAY_ANYMORE,
|
2598 |
+
'text' => $this->get_text_inline( "I can't pay for it anymore", 'reason-cant-pay-anymore' ),
|
2599 |
+
'input_type' => 'textfield',
|
2600 |
+
'input_placeholder' => $this->get_text_inline( 'What price would you feel comfortable paying?', 'placeholder-comfortable-price' )
|
2601 |
+
);
|
2602 |
+
}
|
2603 |
+
|
2604 |
+
$reason_dont_share_info = array(
|
2605 |
+
'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
|
2606 |
+
'text' => $this->get_text_inline( "I don't like to share my information with you", 'reason-dont-like-to-share-my-information' ),
|
2607 |
+
'input_type' => '',
|
2608 |
+
'input_placeholder' => ''
|
2609 |
+
);
|
2610 |
+
|
2611 |
+
/**
|
2612 |
+
* If the current user has selected the "don't share data" reason in the deactivation feedback modal, inform the
|
2613 |
+
* user by showing additional message that he doesn't have to share data and can just choose to skip the opt-in
|
2614 |
+
* (the Skip button is included in the message to show). This message will only be shown if anonymous mode is
|
2615 |
+
* enabled and the user's account is currently not in pending activation state (similar to the way the Skip
|
2616 |
+
* button in the opt-in form is shown/hidden).
|
2617 |
+
*/
|
2618 |
+
if ( $this->is_enable_anonymous() && ! $this->is_pending_activation() ) {
|
2619 |
+
$reason_dont_share_info['internal_message'] = fs_get_template( 'forms/deactivation/retry-skip.php', $internal_message_template_var );
|
2620 |
+
}
|
2621 |
+
|
2622 |
+
$uninstall_reasons = array(
|
2623 |
+
'long-term' => $long_term_user_reasons,
|
2624 |
+
'non-registered-and-non-anonymous-short-term' => array(
|
2625 |
+
array(
|
2626 |
+
'id' => self::REASON_DIDNT_WORK,
|
2627 |
+
'text' => sprintf( $this->get_text_inline( "The %s didn't work", 'reason-didnt-work' ), $module_type ),
|
2628 |
+
'input_type' => '',
|
2629 |
+
'input_placeholder' => ''
|
2630 |
+
),
|
2631 |
+
$reason_dont_share_info,
|
2632 |
+
$reason_found_better_plugin
|
2633 |
+
),
|
2634 |
+
'short-term' => array(
|
2635 |
+
array(
|
2636 |
+
'id' => self::REASON_COULDNT_MAKE_IT_WORK,
|
2637 |
+
'text' => $this->get_text_inline( "I couldn't understand how to make it work", 'reason-couldnt-make-it-work' ),
|
2638 |
+
'input_type' => '',
|
2639 |
+
'input_placeholder' => '',
|
2640 |
+
'internal_message' => $contact_support_template
|
2641 |
+
),
|
2642 |
+
$reason_found_better_plugin,
|
2643 |
+
array(
|
2644 |
+
'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
|
2645 |
+
'text' => sprintf( $this->get_text_inline( "The %s is great, but I need specific feature that you don't support", 'reason-great-but-need-specific-feature' ), $module_type ),
|
2646 |
+
'input_type' => 'textarea',
|
2647 |
+
'input_placeholder' => $this->get_text_inline( 'What feature?', 'placeholder-feature' )
|
2648 |
+
),
|
2649 |
+
array(
|
2650 |
+
'id' => self::REASON_NOT_WORKING,
|
2651 |
+
'text' => sprintf( $this->get_text_inline( 'The %s is not working', 'reason-not-working' ), $module_type ),
|
2652 |
+
'input_type' => 'textarea',
|
2653 |
+
'input_placeholder' => $this->get_text_inline( "Kindly share what didn't work so we can fix it for future users...", 'placeholder-share-what-didnt-work' )
|
2654 |
+
),
|
2655 |
+
array(
|
2656 |
+
'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
|
2657 |
+
'text' => $this->get_text_inline( "It's not what I was looking for", 'reason-not-what-i-was-looking-for' ),
|
2658 |
+
'input_type' => 'textarea',
|
2659 |
+
'input_placeholder' => $this->get_text_inline( "What you've been looking for?", 'placeholder-what-youve-been-looking-for' )
|
2660 |
+
),
|
2661 |
+
array(
|
2662 |
+
'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
|
2663 |
+
'text' => sprintf( $this->get_text_inline( "The %s didn't work as expected", 'reason-didnt-work-as-expected' ), $module_type ),
|
2664 |
+
'input_type' => 'textarea',
|
2665 |
+
'input_placeholder' => $this->get_text_inline( 'What did you expect?', 'placeholder-what-did-you-expect' )
|
2666 |
+
)
|
2667 |
+
)
|
2668 |
+
);
|
2669 |
+
|
2670 |
+
// Randomize the reasons for the current user type.
|
2671 |
+
shuffle( $uninstall_reasons[ $user_type ] );
|
2672 |
+
|
2673 |
+
// Keep the following reasons as the last items in the list.
|
2674 |
+
$uninstall_reasons[ $user_type ][] = $reason_temporary_deactivation;
|
2675 |
+
$uninstall_reasons[ $user_type ][] = $reason_other;
|
2676 |
+
|
2677 |
+
$uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
|
2678 |
+
|
2679 |
+
return $uninstall_reasons[ $user_type ];
|
2680 |
+
}
|
2681 |
+
|
2682 |
+
/**
|
2683 |
+
* Called after the user has submitted his reason for deactivating the plugin.
|
2684 |
+
*
|
2685 |
+
* @author Leo Fajardo (@leorw)
|
2686 |
+
* @since 1.1.2
|
2687 |
+
*/
|
2688 |
+
function _submit_uninstall_reason_action() {
|
2689 |
+
$this->_logger->entrance();
|
2690 |
+
|
2691 |
+
$this->check_ajax_referer( 'submit_uninstall_reason' );
|
2692 |
+
|
2693 |
+
$reason_id = fs_request_get( 'reason_id' );
|
2694 |
+
|
2695 |
+
// Check if the given reason ID is an unsigned integer.
|
2696 |
+
if ( ! ctype_digit( $reason_id ) ) {
|
2697 |
+
exit;
|
2698 |
+
}
|
2699 |
+
|
2700 |
+
$reason_info = trim( fs_request_get( 'reason_info', '' ) );
|
2701 |
+
if ( ! empty( $reason_info ) ) {
|
2702 |
+
$reason_info = substr( $reason_info, 0, 128 );
|
2703 |
+
}
|
2704 |
+
|
2705 |
+
$reason = (object) array(
|
2706 |
+
'id' => $reason_id,
|
2707 |
+
'info' => $reason_info,
|
2708 |
+
'is_anonymous' => fs_request_get_bool( 'is_anonymous' )
|
2709 |
+
);
|
2710 |
+
|
2711 |
+
$this->_storage->store( 'uninstall_reason', $reason );
|
2712 |
+
|
2713 |
+
/**
|
2714 |
+
* If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
|
2715 |
+
* not support uninstall hook.
|
2716 |
+
*
|
2717 |
+
* @author Leo Fajardo (@leorw)
|
2718 |
+
* @since 1.2.2
|
2719 |
+
*/
|
2720 |
+
if ( $this->is_theme() ) {
|
2721 |
+
if ( $this->is_premium() && ! $this->has_active_valid_license() ) {
|
2722 |
+
FS_Plugin_Updater::instance( $this )->delete_update_data();
|
2723 |
+
}
|
2724 |
+
|
2725 |
+
$this->_uninstall_plugin_event( false );
|
2726 |
+
$this->remove_sdk_reference();
|
2727 |
+
}
|
2728 |
+
|
2729 |
+
// Print '1' for successful operation.
|
2730 |
+
echo 1;
|
2731 |
+
exit;
|
2732 |
+
}
|
2733 |
+
|
2734 |
+
/**
|
2735 |
+
* @author Leo Fajardo (@leorw)
|
2736 |
+
* @since 2.1.4
|
2737 |
+
*/
|
2738 |
+
function cancel_subscription_or_trial_ajax_action() {
|
2739 |
+
$this->_logger->entrance();
|
2740 |
+
|
2741 |
+
$this->check_ajax_referer( 'cancel_subscription_or_trial' );
|
2742 |
+
|
2743 |
+
$result = $this->cancel_subscription_or_trial( fs_request_get( 'plugin_id', $this->get_id() ), false );
|
2744 |
+
|
2745 |
+
if ( $this->is_api_error( $result ) ) {
|
2746 |
+
$this->shoot_ajax_failure( $result->error->message );
|
2747 |
+
}
|
2748 |
+
|
2749 |
+
$this->shoot_ajax_success();
|
2750 |
+
}
|
2751 |
+
|
2752 |
+
/**
|
2753 |
+
* @author Leo Fajardo (@leorw)
|
2754 |
+
* @since 2.1.4
|
2755 |
+
*
|
2756 |
+
* @param number $plugin_id
|
2757 |
+
*
|
2758 |
+
* @return object
|
2759 |
+
*/
|
2760 |
+
private function cancel_subscription_or_trial( $plugin_id ) {
|
2761 |
+
$fs = null;
|
2762 |
+
if ( $plugin_id == $this->get_id() ) {
|
2763 |
+
$fs = $this;
|
2764 |
+
} else if ( $this->is_addon_activated( $plugin_id ) ) {
|
2765 |
+
$fs = self::get_instance_by_id( $plugin_id );
|
2766 |
+
}
|
2767 |
+
|
2768 |
+
$result = null;
|
2769 |
+
|
2770 |
+
if ( ! is_null( $fs ) ) {
|
2771 |
+
$result = $fs->is_paid_trial() ?
|
2772 |
+
$fs->_cancel_trial() :
|
2773 |
+
$fs->_downgrade_site();
|
2774 |
+
}
|
2775 |
+
|
2776 |
+
return $result;
|
2777 |
+
}
|
2778 |
+
|
2779 |
+
/**
|
2780 |
+
* @author Leo Fajardo (@leorw)
|
2781 |
+
* @since 2.0.2
|
2782 |
+
*/
|
2783 |
+
function _delete_theme_update_data_action() {
|
2784 |
+
FS_Plugin_Updater::instance( $this )->delete_update_data();
|
2785 |
+
}
|
2786 |
+
|
2787 |
+
#endregion
|
2788 |
+
|
2789 |
+
#----------------------------------------------------------------------------------
|
2790 |
+
#region Instance
|
2791 |
+
#----------------------------------------------------------------------------------
|
2792 |
+
|
2793 |
+
/**
|
2794 |
+
* Main singleton instance.
|
2795 |
+
*
|
2796 |
+
* @author Vova Feldman (@svovaf)
|
2797 |
+
* @since 1.0.0
|
2798 |
+
*
|
2799 |
+
* @param number $module_id
|
2800 |
+
* @param string|bool $slug
|
2801 |
+
* @param bool $is_init Is initiation sequence.
|
2802 |
+
*
|
2803 |
+
* @return Freemius|false
|
2804 |
+
*/
|
2805 |
+
static function instance( $module_id, $slug = false, $is_init = false ) {
|
2806 |
+
if ( empty( $module_id ) ) {
|
2807 |
+
return false;
|
2808 |
+
}
|
2809 |
+
|
2810 |
+
/**
|
2811 |
+
* Load the essential static data prior to initiating FS_Plugin_Manager since there's an essential MS network migration logic that needs to be executed prior to the initiation.
|
2812 |
+
*/
|
2813 |
+
self::_load_required_static();
|
2814 |
+
|
2815 |
+
if ( ! is_numeric( $module_id ) ) {
|
2816 |
+
if ( ! $is_init && true === $slug ) {
|
2817 |
+
$is_init = true;
|
2818 |
+
}
|
2819 |
+
|
2820 |
+
$slug = $module_id;
|
2821 |
+
|
2822 |
+
$module = FS_Plugin_Manager::instance( $slug )->get();
|
2823 |
+
|
2824 |
+
if ( is_object( $module ) ) {
|
2825 |
+
$module_id = $module->id;
|
2826 |
+
}
|
2827 |
+
}
|
2828 |
+
|
2829 |
+
$key = 'm_' . $module_id;
|
2830 |
+
|
2831 |
+
if ( ! isset( self::$_instances[ $key ] ) ) {
|
2832 |
+
self::$_instances[ $key ] = new Freemius( $module_id, $slug, $is_init );
|
2833 |
+
}
|
2834 |
+
|
2835 |
+
return self::$_instances[ $key ];
|
2836 |
+
}
|
2837 |
+
|
2838 |
+
/**
|
2839 |
+
* @author Vova Feldman (@svovaf)
|
2840 |
+
* @since 1.0.6
|
2841 |
+
*
|
2842 |
+
* @param number $addon_id
|
2843 |
+
*
|
2844 |
+
* @return bool
|
2845 |
+
*/
|
2846 |
+
private static function has_instance( $addon_id ) {
|
2847 |
+
return isset( self::$_instances[ 'm_' . $addon_id ] );
|
2848 |
+
}
|
2849 |
+
|
2850 |
+
/**
|
2851 |
+
* @author Leo Fajardo (@leorw)
|
2852 |
+
* @since 1.2.2
|
2853 |
+
*
|
2854 |
+
* @param string|number $id_or_slug
|
2855 |
+
* @param string $module_type
|
2856 |
+
*
|
2857 |
+
* @return number|false
|
2858 |
+
*/
|
2859 |
+
private static function get_module_id( $id_or_slug, $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
|
2860 |
+
if ( is_numeric( $id_or_slug ) ) {
|
2861 |
+
return $id_or_slug;
|
2862 |
+
}
|
2863 |
+
|
2864 |
+
foreach ( self::$_instances as $instance ) {
|
2865 |
+
// Also check the module type since there can be a plugin and a theme with the same slug.
|
2866 |
+
if ( ( $module_type === $instance->get_module_type() ) && ( $id_or_slug === $instance->get_slug() ) ) {
|
2867 |
+
return $instance->get_id();
|
2868 |
+
}
|
2869 |
+
}
|
2870 |
+
|
2871 |
+
return false;
|
2872 |
+
}
|
2873 |
+
|
2874 |
+
/**
|
2875 |
+
* @author Vova Feldman (@svovaf)
|
2876 |
+
* @since 1.0.6
|
2877 |
+
*
|
2878 |
+
* @param number $id
|
2879 |
+
*
|
2880 |
+
* @return false|Freemius
|
2881 |
+
*/
|
2882 |
+
static function get_instance_by_id( $id ) {
|
2883 |
+
return isset ( self::$_instances[ 'm_' . $id ] ) ?
|
2884 |
+
self::$_instances[ 'm_' . $id ] :
|
2885 |
+
false;
|
2886 |
+
}
|
2887 |
+
|
2888 |
+
/**
|
2889 |
+
*
|
2890 |
+
* @author Vova Feldman (@svovaf)
|
2891 |
+
* @since 1.0.1
|
2892 |
+
*
|
2893 |
+
* @param string $plugin_file
|
2894 |
+
* @param string $module_type
|
2895 |
+
*
|
2896 |
+
* @return false|Freemius
|
2897 |
+
*/
|
2898 |
+
static function get_instance_by_file( $plugin_file, $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
|
2899 |
+
$slug = self::find_slug_by_basename( $plugin_file );
|
2900 |
+
|
2901 |
+
return ( false !== $slug ) ?
|
2902 |
+
self::instance( self::get_module_id( $slug, $module_type ) ) :
|
2903 |
+
false;
|
2904 |
+
}
|
2905 |
+
|
2906 |
+
/**
|
2907 |
+
* @author Vova Feldman (@svovaf)
|
2908 |
+
* @since 1.0.6
|
2909 |
+
*
|
2910 |
+
* @return false|Freemius
|
2911 |
+
*/
|
2912 |
+
function get_parent_instance() {
|
2913 |
+
return self::get_instance_by_id( $this->_plugin->parent_plugin_id );
|
2914 |
+
}
|
2915 |
+
|
2916 |
+
/**
|
2917 |
+
* @author Vova Feldman (@svovaf)
|
2918 |
+
* @since 1.0.6
|
2919 |
+
*
|
2920 |
+
* @param string|number $id_or_slug
|
2921 |
+
*
|
2922 |
+
* @return false|Freemius
|
2923 |
+
*/
|
2924 |
+
function get_addon_instance( $id_or_slug ) {
|
2925 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
2926 |
+
|
2927 |
+
return self::instance( $addon_id );
|
2928 |
+
}
|
2929 |
+
|
2930 |
+
#endregion ------------------------------------------------------------------
|
2931 |
+
|
2932 |
+
/**
|
2933 |
+
* @author Vova Feldman (@svovaf)
|
2934 |
+
* @since 1.0.6
|
2935 |
+
*
|
2936 |
+
* @return bool
|
2937 |
+
*/
|
2938 |
+
function is_parent_plugin_installed() {
|
2939 |
+
$is_active = self::has_instance( $this->_plugin->parent_plugin_id );
|
2940 |
+
|
2941 |
+
if ( $is_active ) {
|
2942 |
+
return true;
|
2943 |
+
}
|
2944 |
+
|
2945 |
+
/**
|
2946 |
+
* Parent module might be a theme. If that's the case, the add-on's FS
|
2947 |
+
* instance will be loaded prior to the theme's FS instance, therefore,
|
2948 |
+
* we need to check if it's active with a "look ahead".
|
2949 |
+
*
|
2950 |
+
* @author Vova Feldman
|
2951 |
+
* @since 1.2.2.3
|
2952 |
+
*/
|
2953 |
+
global $fs_active_plugins;
|
2954 |
+
if ( is_object( $fs_active_plugins ) && is_array( $fs_active_plugins->plugins ) ) {
|
2955 |
+
$active_theme = wp_get_theme();
|
2956 |
+
|
2957 |
+
foreach ( $fs_active_plugins->plugins as $sdk => $module ) {
|
2958 |
+
if ( WP_FS__MODULE_TYPE_THEME === $module->type ) {
|
2959 |
+
if ( $module->plugin_path == $active_theme->get_stylesheet() ) {
|
2960 |
+
// Parent module is a theme and it's currently active.
|
2961 |
+
return true;
|
2962 |
+
}
|
2963 |
+
}
|
2964 |
+
}
|
2965 |
+
}
|
2966 |
+
|
2967 |
+
return false;
|
2968 |
+
}
|
2969 |
+
|
2970 |
+
/**
|
2971 |
+
* Check if add-on parent plugin in activation mode.
|
2972 |
+
*
|
2973 |
+
* @author Vova Feldman (@svovaf)
|
2974 |
+
* @since 1.0.7
|
2975 |
+
*
|
2976 |
+
* @return bool
|
2977 |
+
*/
|
2978 |
+
function is_parent_in_activation() {
|
2979 |
+
$parent_fs = $this->get_parent_instance();
|
2980 |
+
if ( ! is_object( $parent_fs ) ) {
|
2981 |
+
return false;
|
2982 |
+
}
|
2983 |
+
|
2984 |
+
return ( $parent_fs->is_activation_mode() );
|
2985 |
+
}
|
2986 |
+
|
2987 |
+
/**
|
2988 |
+
* Is plugin in activation mode.
|
2989 |
+
*
|
2990 |
+
* @author Vova Feldman (@svovaf)
|
2991 |
+
* @since 1.0.7
|
2992 |
+
*
|
2993 |
+
* @param bool $and_on
|
2994 |
+
*
|
2995 |
+
* @return bool
|
2996 |
+
*/
|
2997 |
+
function is_activation_mode( $and_on = true ) {
|
2998 |
+
return fs_is_network_admin() ?
|
2999 |
+
$this->is_network_activation_mode( $and_on ) :
|
3000 |
+
$this->is_site_activation_mode( $and_on );
|
3001 |
+
}
|
3002 |
+
|
3003 |
+
/**
|
3004 |
+
* Is plugin in activation mode.
|
3005 |
+
*
|
3006 |
+
* @author Vova Feldman (@svovaf)
|
3007 |
+
* @since 1.0.7
|
3008 |
+
*
|
3009 |
+
* @param bool $and_on
|
3010 |
+
*
|
3011 |
+
* @return bool
|
3012 |
+
*/
|
3013 |
+
function is_site_activation_mode( $and_on = true ) {
|
3014 |
+
return (
|
3015 |
+
( $this->is_on() || ! $and_on ) &&
|
3016 |
+
(
|
3017 |
+
( $this->is_premium() && true === $this->_storage->require_license_activation ) ||
|
3018 |
+
(
|
3019 |
+
( ! $this->is_registered() ||
|
3020 |
+
( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
|
3021 |
+
( ! $this->is_enable_anonymous() ||
|
3022 |
+
( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
|
3023 |
+
)
|
3024 |
+
)
|
3025 |
+
);
|
3026 |
+
}
|
3027 |
+
|
3028 |
+
/**
|
3029 |
+
* Checks if the SDK in network activation mode.
|
3030 |
+
*
|
3031 |
+
* @author Leo Fajardo (@leorw)
|
3032 |
+
* @since 2.0.0
|
3033 |
+
*
|
3034 |
+
* @param bool $and_on
|
3035 |
+
*
|
3036 |
+
* @return bool
|
3037 |
+
*/
|
3038 |
+
private function is_network_activation_mode( $and_on = true ) {
|
3039 |
+
if ( ! $this->_is_network_active ) {
|
3040 |
+
// Not network activated.
|
3041 |
+
return false;
|
3042 |
+
}
|
3043 |
+
|
3044 |
+
if ( $this->is_network_upgrade_mode() ) {
|
3045 |
+
// Special flag to enforce network activation mode to decide what to do with the sites that are not yet opted-in nor skipped.
|
3046 |
+
return true;
|
3047 |
+
}
|
3048 |
+
|
3049 |
+
if ( ! $this->is_site_activation_mode( $and_on ) ) {
|
3050 |
+
// Whether the context is single site or the network, if the plugin is no longer in activation mode then it is not in network activation mode as well.
|
3051 |
+
return false;
|
3052 |
+
}
|
3053 |
+
|
3054 |
+
if ( $this->is_network_delegated_connection() ) {
|
3055 |
+
// Super-admin delegated the connection to the site admins -> not activation mode.
|
3056 |
+
return false;
|
3057 |
+
}
|
3058 |
+
|
3059 |
+
if ( $this->is_network_anonymous() && true !== $this->_storage->require_license_activation ) {
|
3060 |
+
// Super-admin skipped the connection network wide -> not activation mode.
|
3061 |
+
return false;
|
3062 |
+
}
|
3063 |
+
|
3064 |
+
if ( $this->is_network_registered() ) {
|
3065 |
+
// Super-admin connected at least one site -> not activation mode.
|
3066 |
+
return false;
|
3067 |
+
}
|
3068 |
+
|
3069 |
+
return true;
|
3070 |
+
}
|
3071 |
+
|
3072 |
+
/**
|
3073 |
+
* Check if current page is the opt-in/pending-activation page.
|
3074 |
+
*
|
3075 |
+
* @author Vova Feldman (@svovaf)
|
3076 |
+
* @since 1.2.1.7
|
3077 |
+
*
|
3078 |
+
* @return bool
|
3079 |
+
*/
|
3080 |
+
function is_activation_page() {
|
3081 |
+
if ( $this->_menu->is_activation_page( $this->show_opt_in_on_themes_page() ) ) {
|
3082 |
+
return true;
|
3083 |
+
}
|
3084 |
+
|
3085 |
+
if ( ! $this->is_activation_mode() ) {
|
3086 |
+
return false;
|
3087 |
+
}
|
3088 |
+
|
3089 |
+
// Check if current page is matching the activation page.
|
3090 |
+
return $this->is_matching_url( $this->get_activation_url() );
|
3091 |
+
}
|
3092 |
+
|
3093 |
+
/**
|
3094 |
+
* Check if URL path's are matching and that all querystring
|
3095 |
+
* arguments of the $sub_url exist in the $url with the same values.
|
3096 |
+
*
|
3097 |
+
* WARNING:
|
3098 |
+
* 1. This method doesn't check if the sub/domain are matching.
|
3099 |
+
* 2. Ignore case sensitivity.
|
3100 |
+
*
|
3101 |
+
* @author Vova Feldman (@svovaf)
|
3102 |
+
* @since 1.2.1.7
|
3103 |
+
*
|
3104 |
+
* @param string $sub_url
|
3105 |
+
* @param string $url If argument is not set, check if the sub_url matching the current's page URL.
|
3106 |
+
*
|
3107 |
+
* @return bool
|
3108 |
+
*/
|
3109 |
+
private function is_matching_url( $sub_url, $url = '' ) {
|
3110 |
+
if ( empty( $url ) ) {
|
3111 |
+
$url = $_SERVER['REQUEST_URI'];
|
3112 |
+
}
|
3113 |
+
|
3114 |
+
$url = strtolower( $url );
|
3115 |
+
$sub_url = strtolower( $sub_url );
|
3116 |
+
|
3117 |
+
if ( parse_url( $sub_url, PHP_URL_PATH ) !== parse_url( $url, PHP_URL_PATH ) ) {
|
3118 |
+
// Different path - DO NOT OVERRIDE PAGE.
|
3119 |
+
return false;
|
3120 |
+
}
|
3121 |
+
|
3122 |
+
$url_params = array();
|
3123 |
+
parse_str( parse_url( $url, PHP_URL_QUERY ), $url_params );
|
3124 |
+
|
3125 |
+
$sub_url_params = array();
|
3126 |
+
parse_str( parse_url( $sub_url, PHP_URL_QUERY ), $sub_url_params );
|
3127 |
+
|
3128 |
+
foreach ( $sub_url_params as $key => $val ) {
|
3129 |
+
if ( ! isset( $url_params[ $key ] ) || $val != $url_params[ $key ] ) {
|
3130 |
+
// Not matching query string - DO NOT OVERRIDE PAGE.
|
3131 |
+
return false;
|
3132 |
+
}
|
3133 |
+
}
|
3134 |
+
|
3135 |
+
return true;
|
3136 |
+
}
|
3137 |
+
|
3138 |
+
/**
|
3139 |
+
* Get the basenames of all active plugins for specific blog. Including network activated plugins.
|
3140 |
+
*
|
3141 |
+
* @author Vova Feldman (@svovaf)
|
3142 |
+
* @since 2.0.0
|
3143 |
+
*
|
3144 |
+
* @param int $blog_id
|
3145 |
+
*
|
3146 |
+
* @return string[]
|
3147 |
+
*/
|
3148 |
+
private static function get_active_plugins_basenames( $blog_id = 0 ) {
|
3149 |
+
if ( is_multisite() && $blog_id > 0 ) {
|
3150 |
+
$active_basenames = get_blog_option( $blog_id, 'active_plugins' );
|
3151 |
+
} else {
|
3152 |
+
$active_basenames = get_option( 'active_plugins' );
|
3153 |
+
}
|
3154 |
+
|
3155 |
+
if ( ! is_array( $active_basenames ) ) {
|
3156 |
+
$active_basenames = array();
|
3157 |
+
}
|
3158 |
+
|
3159 |
+
if ( is_multisite() ) {
|
3160 |
+
$network_active_basenames = get_site_option( 'active_sitewide_plugins' );
|
3161 |
+
|
3162 |
+
if ( is_array( $network_active_basenames ) && ! empty( $network_active_basenames ) ) {
|
3163 |
+
$active_basenames = array_merge( $active_basenames, array_keys( $network_active_basenames ) );
|
3164 |
+
}
|
3165 |
+
}
|
3166 |
+
|
3167 |
+
return $active_basenames;
|
3168 |
+
}
|
3169 |
+
|
3170 |
+
/**
|
3171 |
+
* @author Leo Fajardo (@leorw)
|
3172 |
+
* @since 2.3.0
|
3173 |
+
*
|
3174 |
+
* @param int $blog_id
|
3175 |
+
*
|
3176 |
+
* @return array
|
3177 |
+
*/
|
3178 |
+
static function get_active_plugins_directories_map( $blog_id = 0 ) {
|
3179 |
+
$active_basenames = self::get_active_plugins_basenames( $blog_id );
|
3180 |
+
|
3181 |
+
$map = array();
|
3182 |
+
|
3183 |
+
foreach ( $active_basenames as $active_basename ) {
|
3184 |
+
$active_basename = fs_normalize_path( $active_basename );
|
3185 |
+
|
3186 |
+
if ( false === strpos( $active_basename, '/' ) ) {
|
3187 |
+
continue;
|
3188 |
+
}
|
3189 |
+
|
3190 |
+
$map[ dirname( $active_basename ) ] = true;
|
3191 |
+
}
|
3192 |
+
|
3193 |
+
return $map;
|
3194 |
+
}
|
3195 |
+
|
3196 |
+
/**
|
3197 |
+
* Get collection of all active plugins. Including network activated plugins.
|
3198 |
+
*
|
3199 |
+
* @author Vova Feldman (@svovaf)
|
3200 |
+
* @since 1.0.9
|
3201 |
+
*
|
3202 |
+
* @param int $blog_id Since 2.0.0
|
3203 |
+
*
|
3204 |
+
* @return array[string]array
|
3205 |
+
*/
|
3206 |
+
private static function get_active_plugins( $blog_id = 0 ) {
|
3207 |
+
self::require_plugin_essentials();
|
3208 |
+
|
3209 |
+
$active_plugin = array();
|
3210 |
+
$all_plugins = fs_get_plugins();
|
3211 |
+
$active_plugins_basenames = self::get_active_plugins_basenames( $blog_id );
|
3212 |
+
|
3213 |
+
foreach ( $active_plugins_basenames as $plugin_basename ) {
|
3214 |
+
$active_plugin[ $plugin_basename ] = $all_plugins[ $plugin_basename ];
|
3215 |
+
}
|
3216 |
+
|
3217 |
+
return $active_plugin;
|
3218 |
+
}
|
3219 |
+
|
3220 |
+
/**
|
3221 |
+
* Get collection of all site active plugins for a specified blog.
|
3222 |
+
*
|
3223 |
+
* @author Vova Feldman (@svovaf)
|
3224 |
+
* @since 2.0.0
|
3225 |
+
*
|
3226 |
+
* @param int $blog_id
|
3227 |
+
*
|
3228 |
+
* @return array[string]array
|
3229 |
+
*/
|
3230 |
+
private static function get_site_active_plugins( $blog_id = 0 ) {
|
3231 |
+
$active_basenames = ( is_multisite() && $blog_id > 0 ) ?
|
3232 |
+
get_blog_option( $blog_id, 'active_plugins' ) :
|
3233 |
+
get_option( 'active_plugins' );
|
3234 |
+
|
3235 |
+
$active = array();
|
3236 |
+
|
3237 |
+
if ( ! is_array( $active_basenames ) ) {
|
3238 |
+
return $active;
|
3239 |
+
}
|
3240 |
+
|
3241 |
+
foreach ( $active_basenames as $basename ) {
|
3242 |
+
$active[ $basename ] = array(
|
3243 |
+
'is_active' => true,
|
3244 |
+
'Version' => '1.0', // Dummy version.
|
3245 |
+
'slug' => self::get_plugin_slug( $basename ),
|
3246 |
+
);
|
3247 |
+
}
|
3248 |
+
|
3249 |
+
return $active;
|
3250 |
+
}
|
3251 |
+
|
3252 |
+
/**
|
3253 |
+
* Get collection of all plugins with their activation status for a specified blog.
|
3254 |
+
*
|
3255 |
+
* @author Vova Feldman (@svovaf)
|
3256 |
+
* @since 1.1.8
|
3257 |
+
*
|
3258 |
+
* @param int $blog_id Since 2.0.0
|
3259 |
+
*
|
3260 |
+
* @return array Key is the plugin file path and the value is an array of the plugin data.
|
3261 |
+
*/
|
3262 |
+
private static function get_all_plugins( $blog_id = 0 ) {
|
3263 |
+
self::require_plugin_essentials();
|
3264 |
+
|
3265 |
+
$all_plugins = fs_get_plugins();
|
3266 |
+
|
3267 |
+
$active_plugins_basenames = self::get_active_plugins_basenames( $blog_id );
|
3268 |
+
|
3269 |
+
foreach ( $all_plugins as $basename => &$data ) {
|
3270 |
+
// By default set to inactive (next foreach update the active plugins).
|
3271 |
+
$data['is_active'] = false;
|
3272 |
+
// Enrich with plugin slug.
|
3273 |
+
$data['slug'] = self::get_plugin_slug( $basename );
|
3274 |
+
}
|
3275 |
+
|
3276 |
+
// Flag active plugins.
|
3277 |
+
foreach ( $active_plugins_basenames as $basename ) {
|
3278 |
+
if ( isset( $all_plugins[ $basename ] ) ) {
|
3279 |
+
$all_plugins[ $basename ]['is_active'] = true;
|
3280 |
+
}
|
3281 |
+
}
|
3282 |
+
|
3283 |
+
return $all_plugins;
|
3284 |
+
}
|
3285 |
+
|
3286 |
+
/**
|
3287 |
+
* Get collection of all plugins and if they are network level activated.
|
3288 |
+
*
|
3289 |
+
* @author Vova Feldman (@svovaf)
|
3290 |
+
* @since 2.0.0
|
3291 |
+
*
|
3292 |
+
* @return array Key is the plugin basename and the value is an array of the plugin data.
|
3293 |
+
*/
|
3294 |
+
private static function get_network_plugins() {
|
3295 |
+
self::require_plugin_essentials();
|
3296 |
+
|
3297 |
+
$all_plugins = fs_get_plugins();
|
3298 |
+
|
3299 |
+
$network_active_basenames = is_multisite() ?
|
3300 |
+
get_site_option( 'active_sitewide_plugins' ) :
|
3301 |
+
array();
|
3302 |
+
|
3303 |
+
foreach ( $all_plugins as $basename => &$data ) {
|
3304 |
+
// By default set to inactive (next foreach update the active plugins).
|
3305 |
+
$data['is_active'] = false;
|
3306 |
+
// Enrich with plugin slug.
|
3307 |
+
$data['slug'] = self::get_plugin_slug( $basename );
|
3308 |
+
}
|
3309 |
+
|
3310 |
+
// Flag active plugins.
|
3311 |
+
foreach ( $network_active_basenames as $basename ) {
|
3312 |
+
if ( isset( $all_plugins[ $basename ] ) ) {
|
3313 |
+
$all_plugins[ $basename ]['is_active'] = true;
|
3314 |
+
}
|
3315 |
+
}
|
3316 |
+
|
3317 |
+
return $all_plugins;
|
3318 |
+
}
|
3319 |
+
|
3320 |
+
/**
|
3321 |
+
* Cached result of get_site_transient( 'update_plugins' )
|
3322 |
+
*
|
3323 |
+
* @author Vova Feldman (@svovaf)
|
3324 |
+
* @since 1.1.8
|
3325 |
+
*
|
3326 |
+
* @var object
|
3327 |
+
*/
|
3328 |
+
private static $_plugins_info;
|
3329 |
+
|
3330 |
+
/**
|
3331 |
+
* Helper function to get specified plugin's slug.
|
3332 |
+
*
|
3333 |
+
* @author Vova Feldman (@svovaf)
|
3334 |
+
* @since 1.1.8
|
3335 |
+
*
|
3336 |
+
* @param $basename
|
3337 |
+
*
|
3338 |
+
* @return string
|
3339 |
+
*/
|
3340 |
+
private static function get_plugin_slug( $basename ) {
|
3341 |
+
if ( ! isset( self::$_plugins_info ) ) {
|
3342 |
+
self::$_plugins_info = get_site_transient( 'update_plugins' );
|
3343 |
+
}
|
3344 |
+
|
3345 |
+
$slug = '';
|
3346 |
+
|
3347 |
+
if ( is_object( self::$_plugins_info ) ) {
|
3348 |
+
if ( isset( self::$_plugins_info->no_update ) &&
|
3349 |
+
isset( self::$_plugins_info->no_update[ $basename ] ) &&
|
3350 |
+
! empty( self::$_plugins_info->no_update[ $basename ]->slug )
|
3351 |
+
) {
|
3352 |
+
$slug = self::$_plugins_info->no_update[ $basename ]->slug;
|
3353 |
+
} else if ( isset( self::$_plugins_info->response ) &&
|
3354 |
+
isset( self::$_plugins_info->response[ $basename ] ) &&
|
3355 |
+
! empty( self::$_plugins_info->response[ $basename ]->slug )
|
3356 |
+
) {
|
3357 |
+
$slug = self::$_plugins_info->response[ $basename ]->slug;
|
3358 |
+
}
|
3359 |
+
}
|
3360 |
+
|
3361 |
+
if ( empty( $slug ) ) {
|
3362 |
+
// Try to find slug from FS data.
|
3363 |
+
$slug = self::find_slug_by_basename( $basename );
|
3364 |
+
}
|
3365 |
+
|
3366 |
+
if ( empty( $slug ) ) {
|
3367 |
+
// Fallback to plugin's folder name.
|
3368 |
+
$slug = dirname( $basename );
|
3369 |
+
}
|
3370 |
+
|
3371 |
+
return $slug;
|
3372 |
+
}
|
3373 |
+
|
3374 |
+
private static $_statics_loaded = false;
|
3375 |
+
|
3376 |
+
/**
|
3377 |
+
* Load static resources.
|
3378 |
+
*
|
3379 |
+
* @author Vova Feldman (@svovaf)
|
3380 |
+
* @since 1.0.1
|
3381 |
+
*/
|
3382 |
+
private static function _load_required_static() {
|
3383 |
+
if ( self::$_statics_loaded ) {
|
3384 |
+
return;
|
3385 |
+
}
|
3386 |
+
|
3387 |
+
self::$_static_logger = FS_Logger::get_logger( WP_FS__SLUG, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
3388 |
+
|
3389 |
+
self::$_static_logger->entrance();
|
3390 |
+
|
3391 |
+
self::$_accounts = FS_Options::instance( WP_FS__ACCOUNTS_OPTION_NAME, true );
|
3392 |
+
|
3393 |
+
if ( is_multisite() ) {
|
3394 |
+
$has_skipped_migration = (
|
3395 |
+
// 'id_slug_type_path_map' - was never stored on older versions, therefore, not exists on the site level.
|
3396 |
+
null === self::$_accounts->get_option( 'id_slug_type_path_map', null, false ) &&
|
3397 |
+
// 'file_slug_map' stored on the site level, so it was running an SDK version before it was integrated with MS-network.
|
3398 |
+
null !== self::$_accounts->get_option( 'file_slug_map', null, false )
|
3399 |
+
);
|
3400 |
+
|
3401 |
+
/**
|
3402 |
+
* If the file_slug_map exists on the site level but doesn't exist on the
|
3403 |
+
* network level storage, it means that we need to process the storage with migration.
|
3404 |
+
*
|
3405 |
+
* The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, file_slug_map will be already set in the network level storage.
|
3406 |
+
*
|
3407 |
+
* @author Vova Feldman (@svovaf)
|
3408 |
+
* @since 2.0.0
|
3409 |
+
*/
|
3410 |
+
if (
|
3411 |
+
( $has_skipped_migration && true !== self::$_accounts->get_option( 'ms_migration_complete', false, true ) ) ||
|
3412 |
+
( null === self::$_accounts->get_option( 'file_slug_map', null, true ) &&
|
3413 |
+
null !== self::$_accounts->get_option( 'file_slug_map', null, false ) )
|
3414 |
+
) {
|
3415 |
+
self::migrate_options_to_network();
|
3416 |
+
}
|
3417 |
+
}
|
3418 |
+
|
3419 |
+
self::$_global_admin_notices = FS_Admin_Notices::instance( 'global' );
|
3420 |
+
|
3421 |
+
if ( ! WP_FS__DEMO_MODE ) {
|
3422 |
+
add_action( ( fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu', array(
|
3423 |
+
'Freemius',
|
3424 |
+
'_add_debug_section'
|
3425 |
+
) );
|
3426 |
+
}
|
3427 |
+
|
3428 |
+
add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
|
3429 |
+
|
3430 |
+
self::add_ajax_action_static( 'get_debug_log', array( 'Freemius', '_get_debug_log' ) );
|
3431 |
+
|
3432 |
+
self::add_ajax_action_static( 'get_db_option', array( 'Freemius', '_get_db_option' ) );
|
3433 |
+
|
3434 |
+
self::add_ajax_action_static( 'set_db_option', array( 'Freemius', '_set_db_option' ) );
|
3435 |
+
|
3436 |
+
if ( 0 == did_action( 'plugins_loaded' ) ) {
|
3437 |
+
add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
|
3438 |
+
}
|
3439 |
+
|
3440 |
+
add_action( 'admin_footer', array( 'Freemius', '_enrich_ajax_url' ) );
|
3441 |
+
add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
|
3442 |
+
|
3443 |
+
if ( self::is_plugins_page() || self::is_themes_page() ) {
|
3444 |
+
add_action( 'admin_print_footer_scripts', array( 'Freemius', '_maybe_add_beta_label_styles' ), 9 );
|
3445 |
+
|
3446 |
+
/**
|
3447 |
+
* Specifically use this hook so that the JS event handlers will work properly on the "Themes"
|
3448 |
+
* page.
|
3449 |
+
*
|
3450 |
+
* @author Leo Fajardo (@leorw)
|
3451 |
+
* @since 2.3.0
|
3452 |
+
*/
|
3453 |
+
add_action( 'admin_footer-' . self::get_current_page(), array( 'Freemius', '_maybe_add_beta_label_to_plugins_and_handle_confirmation') );
|
3454 |
+
}
|
3455 |
+
|
3456 |
+
self::$_statics_loaded = true;
|
3457 |
+
}
|
3458 |
+
|
3459 |
+
/**
|
3460 |
+
* @author Leo Fajardo (@leorw)
|
3461 |
+
*
|
3462 |
+
* @since 2.1.3
|
3463 |
+
*/
|
3464 |
+
private static function migrate_options_to_network() {
|
3465 |
+
self::migrate_accounts_to_network();
|
3466 |
+
|
3467 |
+
// Migrate API options from site level to network level.
|
3468 |
+
$api_network_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true, true );
|
3469 |
+
$api_network_options->migrate_to_network();
|
3470 |
+
|
3471 |
+
// Migrate API cache to network level storage.
|
3472 |
+
FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME )->migrate_to_network();
|
3473 |
+
|
3474 |
+
self::$_accounts->set_option( 'ms_migration_complete', true, true );
|
3475 |
+
}
|
3476 |
+
|
3477 |
+
#----------------------------------------------------------------------------------
|
3478 |
+
#region Localization
|
3479 |
+
#----------------------------------------------------------------------------------
|
3480 |
+
|
3481 |
+
/**
|
3482 |
+
* Load framework's text domain.
|
3483 |
+
*
|
3484 |
+
* @author Vova Feldman (@svovaf)
|
3485 |
+
* @since 1.2.1
|
3486 |
+
*/
|
3487 |
+
static function _load_textdomain() {
|
3488 |
+
if ( ! is_admin() ) {
|
3489 |
+
return;
|
3490 |
+
}
|
3491 |
+
|
3492 |
+
global $fs_active_plugins;
|
3493 |
+
|
3494 |
+
// Works both for plugins and themes.
|
3495 |
+
load_plugin_textdomain(
|
3496 |
+
'freemius',
|
3497 |
+
false,
|
3498 |
+
$fs_active_plugins->newest->sdk_path . '/languages/'
|
3499 |
+
);
|
3500 |
+
}
|
3501 |
+
|
3502 |
+
#endregion
|
3503 |
+
|
3504 |
+
#----------------------------------------------------------------------------------
|
3505 |
+
#region Debugging
|
3506 |
+
#----------------------------------------------------------------------------------
|
3507 |
+
|
3508 |
+
/**
|
3509 |
+
* @author Vova Feldman (@svovaf)
|
3510 |
+
* @since 1.0.8
|
3511 |
+
*/
|
3512 |
+
static function _add_debug_section() {
|
3513 |
+
if ( ! is_super_admin() ) {
|
3514 |
+
// Add debug page only for super-admins.
|
3515 |
+
return;
|
3516 |
+
}
|
3517 |
+
|
3518 |
+
self::$_static_logger->entrance();
|
3519 |
+
|
3520 |
+
$title = sprintf( '%s [v.%s]', fs_text_inline( 'Freemius Debug' ), WP_FS__SDK_VERSION );
|
3521 |
+
|
3522 |
+
if ( WP_FS__DEV_MODE ) {
|
3523 |
+
// Add top-level debug menu item.
|
3524 |
+
$hook = FS_Admin_Menu_Manager::add_page(
|
3525 |
+
$title,
|
3526 |
+
$title,
|
3527 |
+
'manage_options',
|
3528 |
+
'freemius',
|
3529 |
+
array( 'Freemius', '_debug_page_render' )
|
3530 |
+
);
|
3531 |
+
} else {
|
3532 |
+
// Add hidden debug page.
|
3533 |
+
$hook = FS_Admin_Menu_Manager::add_subpage(
|
3534 |
+
null,
|
3535 |
+
$title,
|
3536 |
+
$title,
|
3537 |
+
'manage_options',
|
3538 |
+
'freemius',
|
3539 |
+
array( 'Freemius', '_debug_page_render' )
|
3540 |
+
);
|
3541 |
+
}
|
3542 |
+
|
3543 |
+
if ( ! empty( $hook ) ) {
|
3544 |
+
add_action( "load-$hook", array( 'Freemius', '_debug_page_actions' ) );
|
3545 |
+
}
|
3546 |
+
}
|
3547 |
+
|
3548 |
+
/**
|
3549 |
+
* @author Vova Feldman (@svovaf)
|
3550 |
+
* @since 1.1.7.3
|
3551 |
+
*/
|
3552 |
+
static function _toggle_debug_mode() {
|
3553 |
+
if ( ! is_super_admin() ) {
|
3554 |
+
return;
|
3555 |
+
}
|
3556 |
+
|
3557 |
+
$is_on = fs_request_get( 'is_on', false, 'post' );
|
3558 |
+
|
3559 |
+
if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) {
|
3560 |
+
update_option( 'fs_debug_mode', $is_on );
|
3561 |
+
|
3562 |
+
// Turn on/off storage logging.
|
3563 |
+
FS_Logger::_set_storage_logging( ( 1 == $is_on ) );
|
3564 |
+
}
|
3565 |
+
|
3566 |
+
exit;
|
3567 |
+
}
|
3568 |
+
|
3569 |
+
/**
|
3570 |
+
* @author Vova Feldman (@svovaf)
|
3571 |
+
* @since 1.2.1.6
|
3572 |
+
*/
|
3573 |
+
static function _get_debug_log() {
|
3574 |
+
$logs = FS_Logger::load_db_logs(
|
3575 |
+
fs_request_get( 'filters', false, 'post' ),
|
3576 |
+
! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? $_POST['limit'] : 200,
|
3577 |
+
! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? $_POST['offset'] : 0
|
3578 |
+
);
|
3579 |
+
|
3580 |
+
self::shoot_ajax_success( $logs );
|
3581 |
+
}
|
3582 |
+
|
3583 |
+
/**
|
3584 |
+
* @author Vova Feldman (@svovaf)
|
3585 |
+
* @since 1.2.1.7
|
3586 |
+
*/
|
3587 |
+
static function _get_db_option() {
|
3588 |
+
check_admin_referer( 'fs_get_db_option' );
|
3589 |
+
|
3590 |
+
$option_name = fs_request_get( 'option_name' );
|
3591 |
+
|
3592 |
+
if ( ! is_super_admin() ||
|
3593 |
+
! fs_starts_with( $option_name, 'fs_' )
|
3594 |
+
) {
|
3595 |
+
self::shoot_ajax_failure();
|
3596 |
+
}
|
3597 |
+
|
3598 |
+
$value = get_option( $option_name );
|
3599 |
+
|
3600 |
+
$result = array(
|
3601 |
+
'name' => $option_name,
|
3602 |
+
);
|
3603 |
+
|
3604 |
+
if ( false !== $value ) {
|
3605 |
+
if ( ! is_string( $value ) ) {
|
3606 |
+
$value = json_encode( $value );
|
3607 |
+
}
|
3608 |
+
|
3609 |
+
$result['value'] = $value;
|
3610 |
+
}
|
3611 |
+
|
3612 |
+
self::shoot_ajax_success( $result );
|
3613 |
+
}
|
3614 |
+
|
3615 |
+
/**
|
3616 |
+
* @author Vova Feldman (@svovaf)
|
3617 |
+
* @since 1.2.1.7
|
3618 |
+
*/
|
3619 |
+
static function _set_db_option() {
|
3620 |
+
check_admin_referer( 'fs_set_db_option' );
|
3621 |
+
|
3622 |
+
$option_name = fs_request_get( 'option_name' );
|
3623 |
+
|
3624 |
+
if ( ! is_super_admin() ||
|
3625 |
+
! fs_starts_with( $option_name, 'fs_' )
|
3626 |
+
) {
|
3627 |
+
self::shoot_ajax_failure();
|
3628 |
+
}
|
3629 |
+
|
3630 |
+
$option_value = fs_request_get( 'option_value' );
|
3631 |
+
|
3632 |
+
if ( ! empty( $option_value ) ) {
|
3633 |
+
update_option( $option_name, $option_value );
|
3634 |
+
}
|
3635 |
+
|
3636 |
+
self::shoot_ajax_success();
|
3637 |
+
}
|
3638 |
+
|
3639 |
+
/**
|
3640 |
+
* @author Vova Feldman (@svovaf)
|
3641 |
+
* @since 1.0.8
|
3642 |
+
*/
|
3643 |
+
static function _debug_page_actions() {
|
3644 |
+
self::_clean_admin_content_section();
|
3645 |
+
|
3646 |
+
if ( fs_request_is_action( 'restart_freemius' ) ) {
|
3647 |
+
check_admin_referer( 'restart_freemius' );
|
3648 |
+
|
3649 |
+
if ( ! is_multisite() ) {
|
3650 |
+
// Clear accounts data.
|
3651 |
+
self::$_accounts->clear( null, true );
|
3652 |
+
} else {
|
3653 |
+
$sites = self::get_sites();
|
3654 |
+
foreach ( $sites as $site ) {
|
3655 |
+
$blog_id = self::get_site_blog_id( $site );
|
3656 |
+
self::$_accounts->clear( $blog_id, true );
|
3657 |
+
}
|
3658 |
+
|
3659 |
+
// Clear network level storage.
|
3660 |
+
self::$_accounts->clear( true, true );
|
3661 |
+
}
|
3662 |
+
|
3663 |
+
// Clear SDK reference cache.
|
3664 |
+
delete_option( 'fs_active_plugins' );
|
3665 |
+
} else if ( fs_request_is_action( 'clear_updates_data' ) ) {
|
3666 |
+
check_admin_referer( 'clear_updates_data' );
|
3667 |
+
|
3668 |
+
if ( ! is_multisite() ) {
|
3669 |
+
set_site_transient( 'update_plugins', null );
|
3670 |
+
set_site_transient( 'update_themes', null );
|
3671 |
+
} else {
|
3672 |
+
$current_blog_id = get_current_blog_id();
|
3673 |
+
|
3674 |
+
$sites = self::get_sites();
|
3675 |
+
foreach ( $sites as $site ) {
|
3676 |
+
switch_to_blog( self::get_site_blog_id( $site ) );
|
3677 |
+
|
3678 |
+
set_site_transient( 'update_plugins', null );
|
3679 |
+
set_site_transient( 'update_themes', null );
|
3680 |
+
}
|
3681 |
+
|
3682 |
+
switch_to_blog( $current_blog_id );
|
3683 |
+
}
|
3684 |
+
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
3685 |
+
check_admin_referer( 'simulate_trial' );
|
3686 |
+
|
3687 |
+
$fs = freemius( fs_request_get( 'module_id' ) );
|
3688 |
+
|
3689 |
+
// Update SDK install to at least 24 hours before.
|
3690 |
+
$fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC );
|
3691 |
+
// Unset the trial shown timestamp.
|
3692 |
+
unset( $fs->_storage->trial_promotion_shown );
|
3693 |
+
} else if ( fs_request_is_action( 'simulate_network_upgrade' ) ) {
|
3694 |
+
check_admin_referer( 'simulate_network_upgrade' );
|
3695 |
+
|
3696 |
+
$fs = freemius( fs_request_get( 'module_id' ) );
|
3697 |
+
|
3698 |
+
self::set_network_upgrade_mode( $fs->_storage );
|
3699 |
+
} else if ( fs_request_is_action( 'delete_install' ) ) {
|
3700 |
+
check_admin_referer( 'delete_install' );
|
3701 |
+
|
3702 |
+
self::_delete_site_by_slug(
|
3703 |
+
fs_request_get( 'slug' ),
|
3704 |
+
fs_request_get( 'module_type' ),
|
3705 |
+
true,
|
3706 |
+
fs_request_get( 'blog_id', null )
|
3707 |
+
);
|
3708 |
+
} else if ( fs_request_is_action( 'delete_user' ) ) {
|
3709 |
+
check_admin_referer( 'delete_user' );
|
3710 |
+
|
3711 |
+
self::delete_user( fs_request_get( 'user_id' ) );
|
3712 |
+
} else if ( fs_request_is_action( 'download_logs' ) ) {
|
3713 |
+
check_admin_referer( 'download_logs' );
|
3714 |
+
|
3715 |
+
$download_url = FS_Logger::download_db_logs(
|
3716 |
+
fs_request_get( 'filters', false, 'post' )
|
3717 |
+
);
|
3718 |
+
|
3719 |
+
if ( false === $download_url ) {
|
3720 |
+
wp_die( 'Oops... there was an error while generating the logs download file. Please try again and if it doesn\'t work contact support@freemius.com.' );
|
3721 |
+
}
|
3722 |
+
|
3723 |
+
fs_redirect( $download_url );
|
3724 |
+
} else if ( fs_request_is_action( 'migrate_options_to_network' ) ) {
|
3725 |
+
check_admin_referer( 'migrate_options_to_network' );
|
3726 |
+
|
3727 |
+
self::migrate_options_to_network();
|
3728 |
+
}
|
3729 |
+
}
|
3730 |
+
|
3731 |
+
/**
|
3732 |
+
* @author Vova Feldman (@svovaf)
|
3733 |
+
* @since 1.0.8
|
3734 |
+
*/
|
3735 |
+
static function _debug_page_render() {
|
3736 |
+
self::$_static_logger->entrance();
|
3737 |
+
|
3738 |
+
if ( ! is_multisite() ) {
|
3739 |
+
$all_plugins_installs = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN );
|
3740 |
+
$all_themes_installs = self::get_all_sites( WP_FS__MODULE_TYPE_THEME );
|
3741 |
+
} else {
|
3742 |
+
$sites = self::get_sites();
|
3743 |
+
|
3744 |
+
$all_plugins_installs = array();
|
3745 |
+
$all_themes_installs = array();
|
3746 |
+
|
3747 |
+
foreach ( $sites as $site ) {
|
3748 |
+
$blog_id = self::get_site_blog_id( $site );
|
3749 |
+
|
3750 |
+
$plugins_installs = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
|
3751 |
+
|
3752 |
+
foreach ( $plugins_installs as $slug => $install ) {
|
3753 |
+
if ( ! isset( $all_plugins_installs[ $slug ] ) ) {
|
3754 |
+
$all_plugins_installs[ $slug ] = array();
|
3755 |
+
}
|
3756 |
+
|
3757 |
+
$install->blog_id = $blog_id;
|
3758 |
+
|
3759 |
+
$all_plugins_installs[ $slug ][] = $install;
|
3760 |
+
}
|
3761 |
+
|
3762 |
+
$themes_installs = self::get_all_sites( WP_FS__MODULE_TYPE_THEME, $blog_id );
|
3763 |
+
|
3764 |
+
foreach ( $themes_installs as $slug => $install ) {
|
3765 |
+
if ( ! isset( $all_themes_installs[ $slug ] ) ) {
|
3766 |
+
$all_themes_installs[ $slug ] = array();
|
3767 |
+
}
|
3768 |
+
|
3769 |
+
$install->blog_id = $blog_id;
|
3770 |
+
|
3771 |
+
$all_themes_installs[ $slug ][] = $install;
|
3772 |
+
}
|
3773 |
+
}
|
3774 |
+
}
|
3775 |
+
|
3776 |
+
$licenses_by_module_type = self::get_all_licenses_by_module_type();
|
3777 |
+
|
3778 |
+
$vars = array(
|
3779 |
+
'plugin_sites' => $all_plugins_installs,
|
3780 |
+
'theme_sites' => $all_themes_installs,
|
3781 |
+
'users' => self::get_all_users(),
|
3782 |
+
'addons' => self::get_all_addons(),
|
3783 |
+
'account_addons' => self::get_all_account_addons(),
|
3784 |
+
'plugin_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_PLUGIN ],
|
3785 |
+
'theme_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_THEME ]
|
3786 |
+
);
|
3787 |
+
|
3788 |
+
fs_enqueue_local_style( 'fs_debug', '/admin/debug.css' );
|
3789 |
+
fs_require_once_template( 'debug.php', $vars );
|
3790 |
+
}
|
3791 |
+
|
3792 |
+
#endregion
|
3793 |
+
|
3794 |
+
#----------------------------------------------------------------------------------
|
3795 |
+
#region Connectivity Issues
|
3796 |
+
#----------------------------------------------------------------------------------
|
3797 |
+
|
3798 |
+
/**
|
3799 |
+
* Check if Freemius should be turned on for the current plugin install.
|
3800 |
+
*
|
3801 |
+
* Note:
|
3802 |
+
* $this->_is_on is updated in has_api_connectivity()
|
3803 |
+
*
|
3804 |
+
* @author Vova Feldman (@svovaf)
|
3805 |
+
* @since 1.0.9
|
3806 |
+
*
|
3807 |
+
* @return bool
|
3808 |
+
*/
|
3809 |
+
function is_on() {
|
3810 |
+
self::$_static_logger->entrance();
|
3811 |
+
|
3812 |
+
if ( isset( $this->_is_on ) ) {
|
3813 |
+
return $this->_is_on;
|
3814 |
+
}
|
3815 |
+
|
3816 |
+
// If already installed or pending then sure it's on :)
|
3817 |
+
if ( $this->is_registered() || $this->is_pending_activation() ) {
|
3818 |
+
$this->_is_on = true;
|
3819 |
+
|
3820 |
+
return true;
|
3821 |
+
}
|
3822 |
+
|
3823 |
+
return false;
|
3824 |
+
}
|
3825 |
+
|
3826 |
+
/**
|
3827 |
+
* @author Vova Feldman (@svovaf)
|
3828 |
+
* @since 1.1.7.3
|
3829 |
+
*
|
3830 |
+
* @param bool $flush_if_no_connectivity
|
3831 |
+
*
|
3832 |
+
* @return bool
|
3833 |
+
*/
|
3834 |
+
private function should_run_connectivity_test( $flush_if_no_connectivity = false ) {
|
3835 |
+
if ( ! isset( $this->_storage->connectivity_test ) ) {
|
3836 |
+
// Connectivity test was never executed, or cache was cleared.
|
3837 |
+
return true;
|
3838 |
+
}
|
3839 |
+
|
3840 |
+
if ( WP_FS__PING_API_ON_IP_OR_HOST_CHANGES ) {
|
3841 |
+
if ( WP_FS__IS_HTTP_REQUEST ) {
|
3842 |
+
if ( $_SERVER['HTTP_HOST'] != $this->_storage->connectivity_test['host'] ) {
|
3843 |
+
// Domain changed.
|
3844 |
+
return true;
|
3845 |
+
}
|
3846 |
+
|
3847 |
+
if ( WP_FS__REMOTE_ADDR != $this->_storage->connectivity_test['server_ip'] ) {
|
3848 |
+
// Server IP changed.
|
3849 |
+
return true;
|
3850 |
+
}
|
3851 |
+
}
|
3852 |
+
}
|
3853 |
+
|
3854 |
+
if ( $this->_storage->connectivity_test['is_connected'] &&
|
3855 |
+
$this->_storage->connectivity_test['is_active']
|
3856 |
+
) {
|
3857 |
+
// API connected and Freemius is active - no need to run connectivity check.
|
3858 |
+
return false;
|
3859 |
+
}
|
3860 |
+
|
3861 |
+
if ( $flush_if_no_connectivity ) {
|
3862 |
+
/**
|
3863 |
+
* If explicitly asked to flush when no connectivity - do it only
|
3864 |
+
* if at least 10 sec passed from the last API connectivity test.
|
3865 |
+
*/
|
3866 |
+
return ( isset( $this->_storage->connectivity_test['timestamp'] ) &&
|
3867 |
+
( WP_FS__SCRIPT_START_TIME - $this->_storage->connectivity_test['timestamp'] ) > 10 );
|
3868 |
+
}
|
3869 |
+
|
3870 |
+
/**
|
3871 |
+
* @since 1.1.7 Don't check for connectivity on plugin downgrade.
|
3872 |
+
*/
|
3873 |
+
$version = $this->get_plugin_version();
|
3874 |
+
if ( version_compare( $version, $this->_storage->connectivity_test['version'], '>' ) ) {
|
3875 |
+
// If it's a plugin version upgrade and Freemius is off or no connectivity, run connectivity test.
|
3876 |
+
return true;
|
3877 |
+
}
|
3878 |
+
|
3879 |
+
return false;
|
3880 |
+
}
|
3881 |
+
|
3882 |
+
/**
|
3883 |
+
* @author Vova Feldman (@svovaf)
|
3884 |
+
* @since 1.1.7.4
|
3885 |
+
*
|
3886 |
+
* @param int|null $blog_id Since 2.0.0.
|
3887 |
+
* @param bool $is_gdpr_test Since 2.0.2. Perform only the GDPR test.
|
3888 |
+
*
|
3889 |
+
* @return object|false
|
3890 |
+
*/
|
3891 |
+
private function ping( $blog_id = null, $is_gdpr_test = false ) {
|
3892 |
+
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY ) {
|
3893 |
+
return false;
|
3894 |
+
}
|
3895 |
+
|
3896 |
+
$version = $this->get_plugin_version();
|
3897 |
+
|
3898 |
+
$is_update = $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() );
|
3899 |
+
|
3900 |
+
return $this->get_api_plugin_scope()->ping(
|
3901 |
+
$this->get_anonymous_id( $blog_id ),
|
3902 |
+
array(
|
3903 |
+
'is_update' => json_encode( $is_update ),
|
3904 |
+
'version' => $version,
|
3905 |
+
'sdk' => $this->version,
|
3906 |
+
'is_admin' => json_encode( is_admin() ),
|
3907 |
+
'is_ajax' => json_encode( self::is_ajax() ),
|
3908 |
+
'is_cron' => json_encode( self::is_cron() ),
|
3909 |
+
'is_gdpr_test' => $is_gdpr_test,
|
3910 |
+
'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
|
3911 |
+
)
|
3912 |
+
);
|
3913 |
+
}
|
3914 |
+
|
3915 |
+
/**
|
3916 |
+
* Check if there's any connectivity issue to Freemius API.
|
3917 |
+
*
|
3918 |
+
* @author Vova Feldman (@svovaf)
|
3919 |
+
* @since 1.0.9
|
3920 |
+
*
|
3921 |
+
* @param bool $flush_if_no_connectivity
|
3922 |
+
*
|
3923 |
+
* @return bool
|
3924 |
+
*/
|
3925 |
+
function has_api_connectivity( $flush_if_no_connectivity = false ) {
|
3926 |
+
$this->_logger->entrance();
|
3927 |
+
|
3928 |
+
if ( isset( $this->_has_api_connection ) && ( $this->_has_api_connection || ! $flush_if_no_connectivity ) ) {
|
3929 |
+
return $this->_has_api_connection;
|
3930 |
+
}
|
3931 |
+
|
3932 |
+
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY &&
|
3933 |
+
isset( $this->_storage->connectivity_test ) &&
|
3934 |
+
true === $this->_storage->connectivity_test['is_connected']
|
3935 |
+
) {
|
3936 |
+
unset( $this->_storage->connectivity_test );
|
3937 |
+
}
|
3938 |
+
|
3939 |
+
if ( ! $this->should_run_connectivity_test( $flush_if_no_connectivity ) ) {
|
3940 |
+
$this->_has_api_connection = $this->_storage->connectivity_test['is_connected'];
|
3941 |
+
/**
|
3942 |
+
* @since 1.1.6 During dev mode, if there's connectivity - turn Freemius on regardless the configuration.
|
3943 |
+
*
|
3944 |
+
* @since 1.2.1.5 If the user running the premium version then ignore the 'is_active' flag and turn Freemius on to enable license key activation.
|
3945 |
+
*/
|
3946 |
+
$this->_is_on = $this->_storage->connectivity_test['is_active'] ||
|
3947 |
+
$this->is_premium() ||
|
3948 |
+
( WP_FS__DEV_MODE && $this->_has_api_connection && ! WP_FS__SIMULATE_FREEMIUS_OFF );
|
3949 |
+
|
3950 |
+
return $this->_has_api_connection;
|
3951 |
+
}
|
3952 |
+
|
3953 |
+
$pong = $this->ping();
|
3954 |
+
$is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
|
3955 |
+
|
3956 |
+
if ( ! $is_connected ) {
|
3957 |
+
// API failure.
|
3958 |
+
$this->_add_connectivity_issue_message( $pong );
|
3959 |
+
}
|
3960 |
+
|
3961 |
+
if ( $is_connected ) {
|
3962 |
+
FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
|
3963 |
+
}
|
3964 |
+
|
3965 |
+
$this->store_connectivity_info( $pong, $is_connected );
|
3966 |
+
|
3967 |
+
return $this->_has_api_connection;
|
3968 |
+
}
|
3969 |
+
|
3970 |
+
/**
|
3971 |
+
* @author Vova Feldman (@svovaf)
|
3972 |
+
* @since 1.1.7.4
|
3973 |
+
*
|
3974 |
+
* @param object $pong
|
3975 |
+
* @param bool $is_connected
|
3976 |
+
*/
|
3977 |
+
private function store_connectivity_info( $pong, $is_connected ) {
|
3978 |
+
$this->_logger->entrance();
|
3979 |
+
|
3980 |
+
$version = $this->get_plugin_version();
|
3981 |
+
|
3982 |
+
if ( ! $is_connected || WP_FS__SIMULATE_FREEMIUS_OFF ) {
|
3983 |
+
$is_active = false;
|
3984 |
+
} else {
|
3985 |
+
$is_active = ( isset( $pong->is_active ) && true == $pong->is_active );
|
3986 |
+
}
|
3987 |
+
|
3988 |
+
$is_active = $this->apply_filters(
|
3989 |
+
'is_on',
|
3990 |
+
$is_active,
|
3991 |
+
$this->is_plugin_update(),
|
3992 |
+
$version
|
3993 |
+
);
|
3994 |
+
|
3995 |
+
$this->_storage->connectivity_test = array(
|
3996 |
+
'is_connected' => $is_connected,
|
3997 |
+
'host' => $_SERVER['HTTP_HOST'],
|
3998 |
+
'server_ip' => WP_FS__REMOTE_ADDR,
|
3999 |
+
'is_active' => $is_active,
|
4000 |
+
'timestamp' => WP_FS__SCRIPT_START_TIME,
|
4001 |
+
// Last version with connectivity attempt.
|
4002 |
+
'version' => $version,
|
4003 |
+
);
|
4004 |
+
|
4005 |
+
$this->_has_api_connection = $is_connected;
|
4006 |
+
$this->_is_on = $is_active || ( WP_FS__DEV_MODE && $is_connected && ! WP_FS__SIMULATE_FREEMIUS_OFF );
|
4007 |
+
}
|
4008 |
+
|
4009 |
+
/**
|
4010 |
+
* Force turning Freemius on.
|
4011 |
+
*
|
4012 |
+
* @author Vova Feldman (@svovaf)
|
4013 |
+
* @since 1.1.8.1
|
4014 |
+
*
|
4015 |
+
* @return bool TRUE if successfully turned on.
|
4016 |
+
*/
|
4017 |
+
private function turn_on() {
|
4018 |
+
$this->_logger->entrance();
|
4019 |
+
|
4020 |
+
if ( $this->is_on() || ! isset( $this->_storage->connectivity_test['is_active'] ) ) {
|
4021 |
+
return false;
|
4022 |
+
}
|
4023 |
+
|
4024 |
+
$updated_connectivity = $this->_storage->connectivity_test;
|
4025 |
+
$updated_connectivity['is_active'] = true;
|
4026 |
+
$updated_connectivity['timestamp'] = WP_FS__SCRIPT_START_TIME;
|
4027 |
+
$this->_storage->connectivity_test = $updated_connectivity;
|
4028 |
+
|
4029 |
+
$this->_is_on = true;
|
4030 |
+
|
4031 |
+
return true;
|
4032 |
+
}
|
4033 |
+
|
4034 |
+
/**
|
4035 |
+
* Anonymous and unique site identifier (Hash).
|
4036 |
+
*
|
4037 |
+
* @author Vova Feldman (@svovaf)
|
4038 |
+
* @since 1.1.0
|
4039 |
+
*
|
4040 |
+
* @param null|int $blog_id Since 2.0.0
|
4041 |
+
*
|
4042 |
+
* @return string
|
4043 |
+
*/
|
4044 |
+
function get_anonymous_id( $blog_id = null ) {
|
4045 |
+
$unique_id = self::$_accounts->get_option( 'unique_id', null, $blog_id );
|
4046 |
+
|
4047 |
+
if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
|
4048 |
+
$key = fs_strip_url_protocol( get_site_url( $blog_id ) );
|
4049 |
+
|
4050 |
+
$secure_auth = SECURE_AUTH_KEY;
|
4051 |
+
if ( empty( $secure_auth ) ||
|
4052 |
+
false !== strpos( $secure_auth, ' ' ) ||
|
4053 |
+
'put your unique phrase here' === $secure_auth
|
4054 |
+
) {
|
4055 |
+
// Protect against default auth key.
|
4056 |
+
$secure_auth = md5( microtime() );
|
4057 |
+
}
|
4058 |
+
|
4059 |
+
/**
|
4060 |
+
* Base the unique identifier on the WP secure authentication key. Which
|
4061 |
+
* turns the key into a secret anonymous identifier. This will help us
|
4062 |
+
* to avoid duplicate installs generation on the backend upon opt-in.
|
4063 |
+
*
|
4064 |
+
* @author Vova Feldman (@svovaf)
|
4065 |
+
* @since 1.2.3
|
4066 |
+
*/
|
4067 |
+
$unique_id = md5( $key . $secure_auth );
|
4068 |
+
|
4069 |
+
self::$_accounts->set_option( 'unique_id', $unique_id, true, $blog_id );
|
4070 |
+
}
|
4071 |
+
|
4072 |
+
$this->_logger->departure( $unique_id );
|
4073 |
+
|
4074 |
+
return $unique_id;
|
4075 |
+
}
|
4076 |
+
|
4077 |
+
/**
|
4078 |
+
* @author Vova Feldman (@svovaf)
|
4079 |
+
* @since 1.1.7.4
|
4080 |
+
*
|
4081 |
+
* @return \WP_User
|
4082 |
+
*/
|
4083 |
+
static function _get_current_wp_user() {
|
4084 |
+
self::require_pluggable_essentials();
|
4085 |
+
self::wp_cookie_constants();
|
4086 |
+
|
4087 |
+
return wp_get_current_user();
|
4088 |
+
}
|
4089 |
+
|
4090 |
+
/**
|
4091 |
+
* Define cookie constants which are required by Freemius::_get_current_wp_user() since
|
4092 |
+
* it uses wp_get_current_user() which needs the cookie constants set. When a plugin
|
4093 |
+
* is network activated the cookie constants are only configured after the network
|
4094 |
+
* plugins activation, therefore, if we don't define those constants WP will throw
|
4095 |
+
* PHP warnings/notices.
|
4096 |
+
*
|
4097 |
+
* @author Vova Feldman (@svovaf)
|
4098 |
+
* @since 2.1.1
|
4099 |
+
*/
|
4100 |
+
private static function wp_cookie_constants() {
|
4101 |
+
if ( defined( 'LOGGED_IN_COOKIE' ) &&
|
4102 |
+
( defined( 'AUTH_COOKIE' ) || defined( 'SECURE_AUTH_COOKIE' ) )
|
4103 |
+
) {
|
4104 |
+
return;
|
4105 |
+
}
|
4106 |
+
|
4107 |
+
/**
|
4108 |
+
* Used to guarantee unique hash cookies
|
4109 |
+
*
|
4110 |
+
* @since 1.5.0
|
4111 |
+
*/
|
4112 |
+
if ( ! defined( 'COOKIEHASH' ) ) {
|
4113 |
+
$siteurl = get_site_option( 'siteurl' );
|
4114 |
+
if ( $siteurl ) {
|
4115 |
+
define( 'COOKIEHASH', md5( $siteurl ) );
|
4116 |
+
} else {
|
4117 |
+
define( 'COOKIEHASH', '' );
|
4118 |
+
}
|
4119 |
+
}
|
4120 |
+
|
4121 |
+
if ( ! defined( 'LOGGED_IN_COOKIE' ) ) {
|
4122 |
+
define( 'LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH );
|
4123 |
+
}
|
4124 |
+
|
4125 |
+
/**
|
4126 |
+
* @since 2.5.0
|
4127 |
+
*/
|
4128 |
+
if ( ! defined( 'AUTH_COOKIE' ) ) {
|
4129 |
+
define( 'AUTH_COOKIE', 'wordpress_' . COOKIEHASH );
|
4130 |
+
}
|
4131 |
+
|
4132 |
+
/**
|
4133 |
+
* @since 2.6.0
|
4134 |
+
*/
|
4135 |
+
if ( ! defined( 'SECURE_AUTH_COOKIE' ) ) {
|
4136 |
+
define( 'SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH );
|
4137 |
+
}
|
4138 |
+
}
|
4139 |
+
|
4140 |
+
/**
|
4141 |
+
* @author Vova Feldman (@svovaf)
|
4142 |
+
* @since 2.1.0
|
4143 |
+
*
|
4144 |
+
* @return int
|
4145 |
+
*/
|
4146 |
+
static function get_current_wp_user_id() {
|
4147 |
+
$wp_user = self::_get_current_wp_user();
|
4148 |
+
|
4149 |
+
return $wp_user->ID;
|
4150 |
+
}
|
4151 |
+
|
4152 |
+
/**
|
4153 |
+
* @author Vova Feldman (@svovaf)
|
4154 |
+
* @since 1.2.1.7
|
4155 |
+
*
|
4156 |
+
* @param string $email
|
4157 |
+
*
|
4158 |
+
* @return bool
|
4159 |
+
*/
|
4160 |
+
static function is_valid_email( $email ) {
|
4161 |
+
if ( false === filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
|
4162 |
+
return false;
|
4163 |
+
}
|
4164 |
+
|
4165 |
+
$parts = explode( '@', $email );
|
4166 |
+
|
4167 |
+
if ( 2 !== count( $parts ) || empty( $parts[1] ) ) {
|
4168 |
+
return false;
|
4169 |
+
}
|
4170 |
+
|
4171 |
+
$blacklist = array(
|
4172 |
+
'admin.',
|
4173 |
+
'webmaster.',
|
4174 |
+
'localhost.',
|
4175 |
+
'dev.',
|
4176 |
+
'development.',
|
4177 |
+
'test.',
|
4178 |
+
'stage.',
|
4179 |
+
'staging.',
|
4180 |
+
);
|
4181 |
+
|
4182 |
+
// Make sure domain is not one of the blacklisted.
|
4183 |
+
foreach ( $blacklist as $invalid ) {
|
4184 |
+
if ( 0 === strpos( $parts[1], $invalid ) ) {
|
4185 |
+
return false;
|
4186 |
+
}
|
4187 |
+
}
|
4188 |
+
|
4189 |
+
// Get the UTF encoded domain name.
|
4190 |
+
$domain = idn_to_ascii( $parts[1] ) . '.';
|
4191 |
+
|
4192 |
+
return ( checkdnsrr( $domain, 'MX' ) || checkdnsrr( $domain, 'A' ) );
|
4193 |
+
}
|
4194 |
+
|
4195 |
+
/**
|
4196 |
+
* Generate API connectivity issue message.
|
4197 |
+
*
|
4198 |
+
* @author Vova Feldman (@svovaf)
|
4199 |
+
* @since 1.0.9
|
4200 |
+
*
|
4201 |
+
* @param mixed $api_result
|
4202 |
+
* @param bool $is_first_failure
|
4203 |
+
*/
|
4204 |
+
function _add_connectivity_issue_message( $api_result, $is_first_failure = true ) {
|
4205 |
+
if ( ! $this->is_premium() && $this->_enable_anonymous ) {
|
4206 |
+
// Don't add message if it's the free version and can run anonymously.
|
4207 |
+
return;
|
4208 |
+
}
|
4209 |
+
|
4210 |
+
if ( ! function_exists( 'wp_nonce_url' ) ) {
|
4211 |
+
require_once ABSPATH . 'wp-includes/functions.php';
|
4212 |
+
}
|
4213 |
+
|
4214 |
+
$current_user = self::_get_current_wp_user();
|
4215 |
+
// $admin_email = get_option( 'admin_email' );
|
4216 |
+
$admin_email = $current_user->user_email;
|
4217 |
+
|
4218 |
+
// Aliases.
|
4219 |
+
$deactivate_plugin_title = $this->esc_html_inline( 'That\'s exhausting, please deactivate', 'deactivate-plugin-title' );
|
4220 |
+
$deactivate_plugin_desc = $this->esc_html_inline( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.', 'deactivate-plugin-desc' );
|
4221 |
+
$install_previous_title = $this->esc_html_inline( 'Let\'s try your previous version', 'install-previous-title' );
|
4222 |
+
$install_previous_desc = $this->esc_html_inline( 'Uninstall this version and install the previous one.', 'install-previous-desc' );
|
4223 |
+
$fix_issue_title = $this->esc_html_inline( 'Yes - I\'m giving you a chance to fix it', 'fix-issue-title' );
|
4224 |
+
$fix_issue_desc = $this->esc_html_inline( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'fix-issue-desc' );
|
4225 |
+
/* translators: %s: product title (e.g. "Awesome Plugin" requires an access to...) */
|
4226 |
+
$x_requires_access_to_api = $this->esc_html_inline( '%s requires an access to our API.', 'x-requires-access-to-api' );
|
4227 |
+
$sysadmin_title = $this->esc_html_inline( 'I\'m a system administrator', 'sysadmin-title' );
|
4228 |
+
$happy_to_resolve_issue_asap = $this->esc_html_inline( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'happy-to-resolve-issue-asap' );
|
4229 |
+
|
4230 |
+
$message = false;
|
4231 |
+
if ( is_object( $api_result ) &&
|
4232 |
+
isset( $api_result->error ) &&
|
4233 |
+
isset( $api_result->error->code )
|
4234 |
+
) {
|
4235 |
+
switch ( $api_result->error->code ) {
|
4236 |
+
case 'curl_missing':
|
4237 |
+
$missing_methods = '';
|
4238 |
+
if ( is_array( $api_result->missing_methods ) &&
|
4239 |
+
! empty( $api_result->missing_methods )
|
4240 |
+
) {
|
4241 |
+
foreach ( $api_result->missing_methods as $m ) {
|
4242 |
+
if ( 'curl_version' === $m ) {
|
4243 |
+
continue;
|
4244 |
+
}
|
4245 |
+
|
4246 |
+
if ( ! empty( $missing_methods ) ) {
|
4247 |
+
$missing_methods .= ', ';
|
4248 |
+
}
|
4249 |
+
|
4250 |
+
$missing_methods .= sprintf( '<code>%s</code>', $m );
|
4251 |
+
}
|
4252 |
+
|
4253 |
+
if ( ! empty( $missing_methods ) ) {
|
4254 |
+
$missing_methods = sprintf(
|
4255 |
+
'<br><br><b>%s</b> %s',
|
4256 |
+
$this->esc_html_inline( 'Disabled method(s):', 'curl-disabled-methods' ),
|
4257 |
+
$missing_methods
|
4258 |
+
);
|
4259 |
+
}
|
4260 |
+
}
|
4261 |
+
|
4262 |
+
$message = sprintf(
|
4263 |
+
$x_requires_access_to_api . ' ' .
|
4264 |
+
$this->esc_html_inline( 'We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server.', 'curl-missing-message' ) . ' ' .
|
4265 |
+
$missing_methods .
|
4266 |
+
' %s',
|
4267 |
+
'<b>' . $this->get_plugin_name() . '</b>',
|
4268 |
+
sprintf(
|
4269 |
+
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
4270 |
+
sprintf(
|
4271 |
+
'<a class="fs-resolve" data-type="curl" href="#"><b>%s</b></a>%s',
|
4272 |
+
$this->get_text_inline( 'I don\'t know what is cURL or how to install it, help me!', 'curl-missing-no-clue-title' ),
|
4273 |
+
' - ' . sprintf(
|
4274 |
+
$this->get_text_inline( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'curl-missing-no-clue-desc' ),
|
4275 |
+
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
4276 |
+
)
|
4277 |
+
),
|
4278 |
+
sprintf(
|
4279 |
+
'<b>%s</b> - %s',
|
4280 |
+
$sysadmin_title,
|
4281 |
+
esc_html( sprintf( $this->get_text_inline( 'Great, please install cURL and enable it in your php.ini file. In addition, search for the \'disable_functions\' directive in your php.ini file and remove any disabled methods starting with \'curl_\'. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the %s and reactivate it back again.', 'curl-missing-sysadmin-desc' ), $this->get_module_label( true ) ) )
|
4282 |
+
),
|
4283 |
+
sprintf(
|
4284 |
+
'<a href="%s"><b>%s</b></a> - %s',
|
4285 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
4286 |
+
$deactivate_plugin_title,
|
4287 |
+
$deactivate_plugin_desc
|
4288 |
+
)
|
4289 |
+
)
|
4290 |
+
);
|
4291 |
+
break;
|
4292 |
+
case 'cloudflare_ddos_protection':
|
4293 |
+
$message = sprintf(
|
4294 |
+
$x_requires_access_to_api . ' ' .
|
4295 |
+
$this->esc_html_inline( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.', 'cloudflare-blocks-connection-message' ) . ' ' .
|
4296 |
+
$happy_to_resolve_issue_asap .
|
4297 |
+
' %s',
|
4298 |
+
'<b>' . $this->get_plugin_name() . '</b>',
|
4299 |
+
sprintf(
|
4300 |
+
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
4301 |
+
sprintf(
|
4302 |
+
'<a class="fs-resolve" data-type="cloudflare" href="#"><b>%s</b></a>%s',
|
4303 |
+
$fix_issue_title,
|
4304 |
+
' - ' . sprintf(
|
4305 |
+
$fix_issue_desc,
|
4306 |
+
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
4307 |
+
)
|
4308 |
+
),
|
4309 |
+
sprintf(
|
4310 |
+
'<a href="%s" target="_blank" rel="noopener noreferrer"><b>%s</b></a> - %s',
|
4311 |
+
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
4312 |
+
$install_previous_title,
|
4313 |
+
$install_previous_desc
|
4314 |
+
),
|
4315 |
+
sprintf(
|
4316 |
+
'<a href="%s"><b>%s</b></a> - %s',
|
4317 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=' . '', 'deactivate-plugin_' . $this->_plugin_basename ),
|
4318 |
+
$deactivate_plugin_title,
|
4319 |
+
$deactivate_plugin_desc
|
4320 |
+
)
|
4321 |
+
)
|
4322 |
+
);
|
4323 |
+
break;
|
4324 |
+
case 'squid_cache_block':
|
4325 |
+
$message = sprintf(
|
4326 |
+
$x_requires_access_to_api . ' ' .
|
4327 |
+
$this->esc_html_inline( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.', 'squid-blocks-connection-message' ) .
|
4328 |
+
' %s',
|
4329 |
+
'<b>' . $this->get_plugin_name() . '</b>',
|
4330 |
+
sprintf(
|
4331 |
+
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
4332 |
+
sprintf(
|
4333 |
+
'<a class="fs-resolve" data-type="squid" href="#"><b>%s</b></a> - %s',
|
4334 |
+
$this->esc_html_inline( 'I don\'t know what is Squid or ACL, help me!', 'squid-no-clue-title' ),
|
4335 |
+
sprintf(
|
4336 |
+
$this->esc_html_inline( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'squid-no-clue-desc' ),
|
4337 |
+
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
4338 |
+
)
|
4339 |
+
),
|
4340 |
+
sprintf(
|
4341 |
+
'<b>%s</b> - %s',
|
4342 |
+
$sysadmin_title,
|
4343 |
+
sprintf(
|
4344 |
+
$this->esc_html_inline( 'Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again.', 'squid-sysadmin-desc' ),
|
4345 |
+
// We use a filter since the plugin might require additional API connectivity.
|
4346 |
+
'<b>' . implode( ', ', $this->apply_filters( 'api_domains', array(
|
4347 |
+
'api.freemius.com',
|
4348 |
+
'wp.freemius.com'
|
4349 |
+
) ) ) . '</b>',
|
4350 |
+
$this->_module_type
|
4351 |
+
)
|
4352 |
+
),
|
4353 |
+
sprintf(
|
4354 |
+
'<a href="%s"><b>%s</b></a> - %s',
|
4355 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
4356 |
+
$deactivate_plugin_title,
|
4357 |
+
$deactivate_plugin_desc
|
4358 |
+
)
|
4359 |
+
)
|
4360 |
+
);
|
4361 |
+
break;
|
4362 |
+
// default:
|
4363 |
+
// $message = $this->get_text_inline( 'connectivity-test-fails-message' );
|
4364 |
+
// break;
|
4365 |
+
}
|
4366 |
+
}
|
4367 |
+
|
4368 |
+
$message_id = 'failed_connect_api';
|
4369 |
+
$type = 'error';
|
4370 |
+
|
4371 |
+
$connectivity_test_fails_message = $this->esc_html_inline( 'From unknown reason, the API connectivity test failed.', 'connectivity-test-fails-message' );
|
4372 |
+
|
4373 |
+
if ( false === $message ) {
|
4374 |
+
if ( $is_first_failure ) {
|
4375 |
+
// First attempt failed.
|
4376 |
+
$message = sprintf(
|
4377 |
+
$x_requires_access_to_api . ' ' .
|
4378 |
+
$connectivity_test_fails_message . ' ' .
|
4379 |
+
$this->esc_html_inline( 'It\'s probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?', 'connectivity-test-maybe-temporary' ) . '<br><br>' .
|
4380 |
+
'%s',
|
4381 |
+
'<b>' . $this->get_plugin_name() . '</b>',
|
4382 |
+
sprintf(
|
4383 |
+
'<div id="fs_firewall_issue_options">%s %s</div>',
|
4384 |
+
sprintf(
|
4385 |
+
'<a class="button button-primary fs-resolve" data-type="retry_ping" href="#">%s</a>',
|
4386 |
+
$this->get_text_inline( 'Yes - do your thing', 'yes-do-your-thing' )
|
4387 |
+
),
|
4388 |
+
sprintf(
|
4389 |
+
'<a href="%s" class="button">%s</a>',
|
4390 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
4391 |
+
$this->get_text_inline( 'No - just deactivate', 'no-deactivate' )
|
4392 |
+
)
|
4393 |
+
)
|
4394 |
+
);
|
4395 |
+
|
4396 |
+
$message_id = 'failed_connect_api_first';
|
4397 |
+
$type = 'promotion';
|
4398 |
+
} else {
|
4399 |
+
// Second connectivity attempt failed.
|
4400 |
+
$message = sprintf(
|
4401 |
+
$x_requires_access_to_api . ' ' .
|
4402 |
+
$connectivity_test_fails_message . ' ' .
|
4403 |
+
$happy_to_resolve_issue_asap .
|
4404 |
+
' %s',
|
4405 |
+
'<b>' . $this->get_plugin_name() . '</b>',
|
4406 |
+
sprintf(
|
4407 |
+
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
4408 |
+
sprintf(
|
4409 |
+
'<a class="fs-resolve" data-type="general" href="#"><b>%s</b></a>%s',
|
4410 |
+
$fix_issue_title,
|
4411 |
+
' - ' . sprintf(
|
4412 |
+
$fix_issue_desc,
|
4413 |
+
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
4414 |
+
)
|
4415 |
+
),
|
4416 |
+
sprintf(
|
4417 |
+
'<a href="%s" target="_blank" rel="noopener noreferrer"><b>%s</b></a> - %s',
|
4418 |
+
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
4419 |
+
$install_previous_title,
|
4420 |
+
$install_previous_desc
|
4421 |
+
),
|
4422 |
+
sprintf(
|
4423 |
+
'<a href="%s"><b>%s</b></a> - %s',
|
4424 |
+
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
4425 |
+
$deactivate_plugin_title,
|
4426 |
+
$deactivate_plugin_desc
|
4427 |
+
)
|
4428 |
+
)
|
4429 |
+
);
|
4430 |
+
}
|
4431 |
+
}
|
4432 |
+
|
4433 |
+
$this->_admin_notices->add_sticky(
|
4434 |
+
$message,
|
4435 |
+
$message_id,
|
4436 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
4437 |
+
$type
|
4438 |
+
);
|
4439 |
+
}
|
4440 |
+
|
4441 |
+
/**
|
4442 |
+
* Handle user request to resolve connectivity issue.
|
4443 |
+
* This method will send an email to Freemius API technical staff for resolution.
|
4444 |
+
* The email will contain server's info and installed plugins (might be caching issue).
|
4445 |
+
*
|
4446 |
+
* @author Vova Feldman (@svovaf)
|
4447 |
+
* @since 1.0.9
|
4448 |
+
*/
|
4449 |
+
function _email_about_firewall_issue() {
|
4450 |
+
$this->_admin_notices->remove_sticky( 'failed_connect_api' );
|
4451 |
+
|
4452 |
+
$pong = $this->ping();
|
4453 |
+
|
4454 |
+
$is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
|
4455 |
+
|
4456 |
+
if ( $is_connected ) {
|
4457 |
+
FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
|
4458 |
+
|
4459 |
+
$this->store_connectivity_info( $pong, $is_connected );
|
4460 |
+
|
4461 |
+
echo $this->get_after_plugin_activation_redirect_url();
|
4462 |
+
exit;
|
4463 |
+
}
|
4464 |
+
|
4465 |
+
$current_user = self::_get_current_wp_user();
|
4466 |
+
$admin_email = $current_user->user_email;
|
4467 |
+
|
4468 |
+
$error_type = fs_request_get( 'error_type', 'general' );
|
4469 |
+
|
4470 |
+
switch ( $error_type ) {
|
4471 |
+
case 'squid':
|
4472 |
+
$title = 'Squid ACL Blocking Issue';
|
4473 |
+
break;
|
4474 |
+
case 'cloudflare':
|
4475 |
+
$title = 'CloudFlare Blocking Issue';
|
4476 |
+
break;
|
4477 |
+
default:
|
4478 |
+
$title = 'API Connectivity Issue';
|
4479 |
+
break;
|
4480 |
+
}
|
4481 |
+
|
4482 |
+
$custom_email_sections = array();
|
4483 |
+
|
4484 |
+
// Add 'API Error' custom email section.
|
4485 |
+
$custom_email_sections['api_error'] = array(
|
4486 |
+
'title' => 'API Error',
|
4487 |
+
'rows' => array(
|
4488 |
+
'ping' => array(
|
4489 |
+
'API Error',
|
4490 |
+
is_string( $pong ) ? htmlentities( $pong ) : json_encode( $pong )
|
4491 |
+
),
|
4492 |
+
)
|
4493 |
+
);
|
4494 |
+
|
4495 |
+
// Send email with technical details to resolve API connectivity issues.
|
4496 |
+
$this->send_email(
|
4497 |
+
'api@freemius.com', // recipient
|
4498 |
+
$title . ' [' . $this->get_plugin_name() . ']', // subject
|
4499 |
+
$custom_email_sections,
|
4500 |
+
array( "Reply-To: $admin_email <$admin_email>" ) // headers
|
4501 |
+
);
|
4502 |
+
|
4503 |
+
$this->_admin_notices->add_sticky(
|
4504 |
+
sprintf(
|
4505 |
+
$this->get_text_inline( 'Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience.', 'fix-request-sent-message' ),
|
4506 |
+
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
4507 |
+
),
|
4508 |
+
'server_details_sent'
|
4509 |
+
);
|
4510 |
+
|
4511 |
+
// Action was taken, tell that API connectivity troubleshooting should be off now.
|
4512 |
+
|
4513 |
+
echo "1";
|
4514 |
+
exit;
|
4515 |
+
}
|
4516 |
+
|
4517 |
+
/**
|
4518 |
+
* Handle connectivity test retry approved by the user.
|
4519 |
+
*
|
4520 |
+
* @author Vova Feldman (@svovaf)
|
4521 |
+
* @since 1.1.7.4
|
4522 |
+
*/
|
4523 |
+
function _retry_connectivity_test() {
|
4524 |
+
$this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
|
4525 |
+
|
4526 |
+
$pong = $this->ping();
|
4527 |
+
|
4528 |
+
$is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
|
4529 |
+
|
4530 |
+
if ( $is_connected ) {
|
4531 |
+
FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
|
4532 |
+
|
4533 |
+
$this->store_connectivity_info( $pong, $is_connected );
|
4534 |
+
|
4535 |
+
echo $this->get_after_plugin_activation_redirect_url();
|
4536 |
+
} else {
|
4537 |
+
// Add connectivity issue message after 2nd failed attempt.
|
4538 |
+
$this->_add_connectivity_issue_message( $pong, false );
|
4539 |
+
|
4540 |
+
echo "1";
|
4541 |
+
}
|
4542 |
+
|
4543 |
+
exit;
|
4544 |
+
}
|
4545 |
+
|
4546 |
+
static function _add_firewall_issues_javascript() {
|
4547 |
+
$params = array();
|
4548 |
+
fs_require_once_template( 'firewall-issues-js.php', $params );
|
4549 |
+
}
|
4550 |
+
|
4551 |
+
#endregion
|
4552 |
+
|
4553 |
+
#----------------------------------------------------------------------------------
|
4554 |
+
#region Email
|
4555 |
+
#----------------------------------------------------------------------------------
|
4556 |
+
|
4557 |
+
/**
|
4558 |
+
* Generates and sends an HTML email with customizable sections.
|
4559 |
+
*
|
4560 |
+
* @author Leo Fajardo (@leorw)
|
4561 |
+
* @since 1.1.2
|
4562 |
+
*
|
4563 |
+
* @param string $to_address
|
4564 |
+
* @param string $subject
|
4565 |
+
* @param array $sections
|
4566 |
+
* @param array $headers
|
4567 |
+
*
|
4568 |
+
* @return bool Whether the email contents were sent successfully.
|
4569 |
+
*/
|
4570 |
+
private function send_email(
|
4571 |
+
$to_address,
|
4572 |
+
$subject,
|
4573 |
+
$sections = array(),
|
4574 |
+
$headers = array()
|
4575 |
+
) {
|
4576 |
+
$default_sections = $this->get_email_sections();
|
4577 |
+
|
4578 |
+
// Insert new sections or replace the default email sections.
|
4579 |
+
if ( is_array( $sections ) && ! empty( $sections ) ) {
|
4580 |
+
foreach ( $sections as $section_id => $custom_section ) {
|
4581 |
+
if ( ! isset( $default_sections[ $section_id ] ) ) {
|
4582 |
+
// If the section does not exist, add it.
|
4583 |
+
$default_sections[ $section_id ] = $custom_section;
|
4584 |
+
} else {
|
4585 |
+
// If the section already exists, override it.
|
4586 |
+
$current_section = $default_sections[ $section_id ];
|
4587 |
+
|
4588 |
+
// Replace the current section's title if a custom section title exists.
|
4589 |
+
if ( isset( $custom_section['title'] ) ) {
|
4590 |
+
$current_section['title'] = $custom_section['title'];
|
4591 |
+
}
|
4592 |
+
|
4593 |
+
// Insert new rows under the current section or replace the default rows.
|
4594 |
+
if ( isset( $custom_section['rows'] ) && is_array( $custom_section['rows'] ) && ! empty( $custom_section['rows'] ) ) {
|
4595 |
+
foreach ( $custom_section['rows'] as $row_id => $row ) {
|
4596 |
+
$current_section['rows'][ $row_id ] = $row;
|
4597 |
+
}
|
4598 |
+
}
|
4599 |
+
|
4600 |
+
$default_sections[ $section_id ] = $current_section;
|
4601 |
+
}
|
4602 |
+
}
|
4603 |
+
}
|
4604 |
+
|
4605 |
+
$vars = array( 'sections' => $default_sections );
|
4606 |
+
$message = fs_get_template( 'email.php', $vars );
|
4607 |
+
|
4608 |
+
// Set the type of email to HTML.
|
4609 |
+
$headers[] = 'Content-type: text/html; charset=UTF-8';
|
4610 |
+
|
4611 |
+
$header_string = implode( "\r\n", $headers );
|
4612 |
+
|
4613 |
+
return wp_mail(
|
4614 |
+
$to_address,
|
4615 |
+
$subject,
|
4616 |
+
$message,
|
4617 |
+
$header_string
|
4618 |
+
);
|
4619 |
+
}
|
4620 |
+
|
4621 |
+
/**
|
4622 |
+
* Generates the data for the sections of the email content.
|
4623 |
+
*
|
4624 |
+
* @author Leo Fajardo (@leorw)
|
4625 |
+
* @since 1.1.2
|
4626 |
+
*
|
4627 |
+
* @return array
|
4628 |
+
*/
|
4629 |
+
private function get_email_sections() {
|
4630 |
+
// Retrieve the current user's information so that we can get the user's email, first name, and last name below.
|
4631 |
+
$current_user = self::_get_current_wp_user();
|
4632 |
+
|
4633 |
+
// Retrieve the cURL version information so that we can get the version number below.
|
4634 |
+
$curl_version_information = curl_version();
|
4635 |
+
|
4636 |
+
$active_plugin = self::get_active_plugins();
|
4637 |
+
|
4638 |
+
// Generate the list of active plugins separated by new line.
|
4639 |
+
$active_plugin_string = '';
|
4640 |
+
foreach ( $active_plugin as $plugin ) {
|
4641 |
+
$active_plugin_string .= sprintf(
|
4642 |
+
'<a href="%s">%s</a> [v%s]<br>',
|
4643 |
+
$plugin['PluginURI'],
|
4644 |
+
$plugin['Name'],
|
4645 |
+
$plugin['Version']
|
4646 |
+
);
|
4647 |
+
}
|
4648 |
+
|
4649 |
+
$server_ip = WP_FS__REMOTE_ADDR;
|
4650 |
+
|
4651 |
+
// Add PHP info for deeper investigation.
|
4652 |
+
ob_start();
|
4653 |
+
phpinfo();
|
4654 |
+
$php_info = ob_get_clean();
|
4655 |
+
|
4656 |
+
$api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );
|
4657 |
+
|
4658 |
+
// Generate the default email sections.
|
4659 |
+
$sections = array(
|
4660 |
+
'sdk' => array(
|
4661 |
+
'title' => 'SDK',
|
4662 |
+
'rows' => array(
|
4663 |
+
'fs_version' => array( 'FS Version', $this->version ),
|
4664 |
+
'curl_version' => array( 'cURL Version', $curl_version_information['version'] )
|
4665 |
+
)
|
4666 |
+
),
|
4667 |
+
'plugin' => array(
|
4668 |
+
'title' => ucfirst( $this->get_module_type() ),
|
4669 |
+
'rows' => array(
|
4670 |
+
'name' => array( 'Name', $this->get_plugin_name() ),
|
4671 |
+
'version' => array( 'Version', $this->get_plugin_version() )
|
4672 |
+
)
|
4673 |
+
),
|
4674 |
+
'api' => array(
|
4675 |
+
'title' => 'API Subdomain',
|
4676 |
+
'rows' => array(
|
4677 |
+
'dns' => array(
|
4678 |
+
'DNS_CNAME',
|
4679 |
+
function_exists( 'dns_get_record' ) ?
|
4680 |
+
var_export( dns_get_record( $api_domain, DNS_CNAME ), true ) :
|
4681 |
+
'dns_get_record() disabled/blocked'
|
4682 |
+
),
|
4683 |
+
'ip' => array(
|
4684 |
+
'IP',
|
4685 |
+
function_exists( 'gethostbyname' ) ?
|
4686 |
+
gethostbyname( $api_domain ) :
|
4687 |
+
'gethostbyname() disabled/blocked'
|
4688 |
+
),
|
4689 |
+
),
|
4690 |
+
),
|
4691 |
+
'site' => array(
|
4692 |
+
'title' => 'Site',
|
4693 |
+
'rows' => array(
|
4694 |
+
'unique_id' => array( 'Unique ID', $this->get_anonymous_id() ),
|
4695 |
+
'address' => array( 'Address', site_url() ),
|
4696 |
+
'host' => array(
|
4697 |
+
'HTTP_HOST',
|
4698 |
+
( ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '' )
|
4699 |
+
),
|
4700 |
+
'hosting' => array(
|
4701 |
+
'Hosting Company' => fs_request_has( 'hosting_company' ) ?
|
4702 |
+
fs_request_get( 'hosting_company' ) :
|
4703 |
+
'Unknown',
|
4704 |
+
),
|
4705 |
+
'server_addr' => array(
|
4706 |
+
'SERVER_ADDR',
|
4707 |
+
'<a href="http://www.projecthoneypot.org/ip_' . $server_ip . '">' . $server_ip . '</a>'
|
4708 |
+
)
|
4709 |
+
)
|
4710 |
+
),
|
4711 |
+
'user' => array(
|
4712 |
+
'title' => 'User',
|
4713 |
+
'rows' => array(
|
4714 |
+
'email' => array( 'Email', $current_user->user_email ),
|
4715 |
+
'first' => array( 'First', $current_user->user_firstname ),
|
4716 |
+
'last' => array( 'Last', $current_user->user_lastname )
|
4717 |
+
)
|
4718 |
+
),
|
4719 |
+
'plugins' => array(
|
4720 |
+
'title' => 'Plugins',
|
4721 |
+
'rows' => array(
|
4722 |
+
'active_plugins' => array( 'Active Plugins', $active_plugin_string )
|
4723 |
+
)
|
4724 |
+
),
|
4725 |
+
'php_info' => array(
|
4726 |
+
'title' => 'PHP Info',
|
4727 |
+
'rows' => array(
|
4728 |
+
'info' => array( $php_info )
|
4729 |
+
),
|
4730 |
+
)
|
4731 |
+
);
|
4732 |
+
|
4733 |
+
// Allow the sections to be modified by other code.
|
4734 |
+
$sections = $this->apply_filters( 'email_template_sections', $sections );
|
4735 |
+
|
4736 |
+
return $sections;
|
4737 |
+
}
|
4738 |
+
|
4739 |
+
#endregion
|
4740 |
+
|
4741 |
+
#----------------------------------------------------------------------------------
|
4742 |
+
#region Initialization
|
4743 |
+
#----------------------------------------------------------------------------------
|
4744 |
+
|
4745 |
+
/**
|
4746 |
+
* Init plugin's Freemius instance.
|
4747 |
+
*
|
4748 |
+
* @author Vova Feldman (@svovaf)
|
4749 |
+
* @since 1.0.1
|
4750 |
+
*
|
4751 |
+
* @param number $id
|
4752 |
+
* @param string $public_key
|
4753 |
+
* @param bool $is_live
|
4754 |
+
* @param bool $is_premium
|
4755 |
+
*/
|
4756 |
+
function init( $id, $public_key, $is_live = true, $is_premium = true ) {
|
4757 |
+
$this->_logger->entrance();
|
4758 |
+
|
4759 |
+
$this->dynamic_init( array(
|
4760 |
+
'id' => $id,
|
4761 |
+
'public_key' => $public_key,
|
4762 |
+
'is_live' => $is_live,
|
4763 |
+
'is_premium' => $is_premium,
|
4764 |
+
) );
|
4765 |
+
}
|
4766 |
+
|
4767 |
+
/**
|
4768 |
+
* Dynamic initiator, originally created to support initiation
|
4769 |
+
* with parent_id for add-ons.
|
4770 |
+
*
|
4771 |
+
* @author Vova Feldman (@svovaf)
|
4772 |
+
* @since 1.0.6
|
4773 |
+
*
|
4774 |
+
* @param array $plugin_info
|
4775 |
+
*
|
4776 |
+
* @throws Freemius_Exception
|
4777 |
+
*/
|
4778 |
+
function dynamic_init( array $plugin_info ) {
|
4779 |
+
$this->_logger->entrance();
|
4780 |
+
|
4781 |
+
$this->parse_settings( $plugin_info );
|
4782 |
+
|
4783 |
+
$this->register_after_settings_parse_hooks();
|
4784 |
+
|
4785 |
+
if ( $this->should_stop_execution() ) {
|
4786 |
+
return;
|
4787 |
+
}
|
4788 |
+
|
4789 |
+
if ( ! $this->is_registered() ) {
|
4790 |
+
if ( $this->is_anonymous() ) {
|
4791 |
+
// If user skipped, no need to test connectivity.
|
4792 |
+
$this->_has_api_connection = true;
|
4793 |
+
$this->_is_on = true;
|
4794 |
+
} else {
|
4795 |
+
if ( ! $this->has_api_connectivity() ) {
|
4796 |
+
if ( $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) ||
|
4797 |
+
$this->_admin_notices->has_sticky( 'failed_connect_api' )
|
4798 |
+
) {
|
4799 |
+
if ( ! $this->_enable_anonymous || $this->is_premium() ) {
|
4800 |
+
// If anonymous mode is disabled, add firewall admin-notice message.
|
4801 |
+
add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
|
4802 |
+
|
4803 |
+
$ajax_action_suffix = $this->_slug . ( $this->is_theme() ? ':theme' : '' );
|
4804 |
+
add_action( "wp_ajax_fs_resolve_firewall_issues_{$ajax_action_suffix}", array(
|
4805 |
+
&$this,
|
4806 |
+
'_email_about_firewall_issue'
|
4807 |
+
) );
|
4808 |
+
|
4809 |
+
add_action( "wp_ajax_fs_retry_connectivity_test_{$ajax_action_suffix}", array(
|
4810 |
+
&$this,
|
4811 |
+
'_retry_connectivity_test'
|
4812 |
+
) );
|
4813 |
+
|
4814 |
+
/**
|
4815 |
+
* Currently the admin notice manager relies on the module's type and slug. The new AJAX actions manager uses module IDs, hence, consider to replace the if block above with the commented code below after adjusting the admin notices manager to work with module IDs.
|
4816 |
+
*
|
4817 |
+
* @author Vova Feldman (@svovaf)
|
4818 |
+
* @since 2.0.0
|
4819 |
+
*/
|
4820 |
+
/*$this->add_ajax_action( 'resolve_firewall_issues', array(
|
4821 |
+
&$this,
|
4822 |
+
'_email_about_firewall_issue'
|
4823 |
+
) );
|
4824 |
+
|
4825 |
+
$this->add_ajax_action( 'retry_connectivity_test', array(
|
4826 |
+
&$this,
|
4827 |
+
'_retry_connectivity_test'
|
4828 |
+
) );*/
|
4829 |
+
}
|
4830 |
+
}
|
4831 |
+
|
4832 |
+
return;
|
4833 |
+
} else {
|
4834 |
+
$this->_admin_notices->remove_sticky( array(
|
4835 |
+
'failed_connect_api_first',
|
4836 |
+
'failed_connect_api',
|
4837 |
+
) );
|
4838 |
+
|
4839 |
+
if ( $this->_anonymous_mode ) {
|
4840 |
+
// Simulate anonymous mode.
|
4841 |
+
$this->_is_anonymous = true;
|
4842 |
+
}
|
4843 |
+
}
|
4844 |
+
}
|
4845 |
+
}
|
4846 |
+
|
4847 |
+
/**
|
4848 |
+
* This should be executed even if Freemius is off for the core module,
|
4849 |
+
* otherwise, the add-ons dialogbox won't work properly. This is esepcially
|
4850 |
+
* relevant when the developer decided to turn FS off for existing users.
|
4851 |
+
*
|
4852 |
+
* @author Vova Feldman (@svovaf)
|
4853 |
+
*/
|
4854 |
+
if ( $this->is_user_in_admin() &&
|
4855 |
+
'plugin-information' === fs_request_get( 'tab', false ) &&
|
4856 |
+
$this->should_use_freemius_updater_and_dialog() &&
|
4857 |
+
(
|
4858 |
+
( $this->is_addon() && $this->get_slug() == fs_request_get( 'plugin', false ) ) ||
|
4859 |
+
( $this->has_addons() && $this->get_id() == fs_request_get( 'parent_plugin_id', false ) )
|
4860 |
+
)
|
4861 |
+
) {
|
4862 |
+
require_once WP_FS__DIR_INCLUDES . '/fs-plugin-info-dialog.php';
|
4863 |
+
|
4864 |
+
new FS_Plugin_Info_Dialog( $this->is_addon() ? $this->get_parent_instance() : $this );
|
4865 |
+
}
|
4866 |
+
|
4867 |
+
// Check if Freemius is on for the current plugin.
|
4868 |
+
// This MUST be executed after all the plugin variables has been loaded.
|
4869 |
+
if ( ! $this->is_registered() && ! $this->is_on() ) {
|
4870 |
+
return;
|
4871 |
+
}
|
4872 |
+
|
4873 |
+
if ( $this->has_api_connectivity() ) {
|
4874 |
+
if ( self::is_cron() ) {
|
4875 |
+
$this->hook_callback_to_sync_cron();
|
4876 |
+
} else if ( $this->is_user_in_admin() ) {
|
4877 |
+
/**
|
4878 |
+
* Schedule daily data sync cron if:
|
4879 |
+
*
|
4880 |
+
* 1. User opted-in (for tracking).
|
4881 |
+
* 2. If skipped, but later upgraded (opted-in via upgrade).
|
4882 |
+
*
|
4883 |
+
* @author Vova Feldman (@svovaf)
|
4884 |
+
* @since 1.1.7.3
|
4885 |
+
*
|
4886 |
+
*/
|
4887 |
+
if ( $this->is_registered() ) {
|
4888 |
+
if ( ! $this->is_sync_cron_on() && $this->is_tracking_allowed() ) {
|
4889 |
+
$this->schedule_sync_cron();
|
4890 |
+
}
|
4891 |
+
}
|
4892 |
+
|
4893 |
+
/**
|
4894 |
+
* Check if requested for manual blocking background sync.
|
4895 |
+
*/
|
4896 |
+
if ( fs_request_has( 'background_sync' ) ) {
|
4897 |
+
$this->run_manual_sync();
|
4898 |
+
}
|
4899 |
+
}
|
4900 |
+
}
|
4901 |
+
|
4902 |
+
if ( $this->is_registered() ) {
|
4903 |
+
$this->hook_callback_to_install_sync();
|
4904 |
+
}
|
4905 |
+
|
4906 |
+
if ( $this->is_addon() ) {
|
4907 |
+
if ( $this->is_parent_plugin_installed() ) {
|
4908 |
+
// Link to parent FS.
|
4909 |
+
$this->_parent = self::get_instance_by_id( $this->_plugin->parent_plugin_id );
|
4910 |
+
|
4911 |
+
// Get parent plugin reference.
|
4912 |
+
$this->_parent_plugin = $this->_parent->get_plugin();
|
4913 |
+
}
|
4914 |
+
}
|
4915 |
+
|
4916 |
+
if ( $this->is_user_in_admin() ) {
|
4917 |
+
if ( $this->is_addon() ) {
|
4918 |
+
if ( ! $this->is_parent_plugin_installed() ) {
|
4919 |
+
$parent_name = $this->get_option( $plugin_info, 'parent_name', null );
|
4920 |
+
|
4921 |
+
if ( isset( $plugin_info['parent'] ) ) {
|
4922 |
+
$parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
|
4923 |
+
}
|
4924 |
+
|
4925 |
+
$this->_admin_notices->add(
|
4926 |
+
( ! empty( $parent_name ) ?
|
4927 |
+
sprintf( $this->get_text_x_inline( '%s cannot run without %s.', 'addonX cannot run without pluginY', 'addon-x-cannot-run-without-y' ), $this->get_plugin_name(), $parent_name ) :
|
4928 |
+
sprintf( $this->get_text_x_inline( '%s cannot run without the plugin.', 'addonX cannot run...', 'addon-x-cannot-run-without-parent' ), $this->get_plugin_name() )
|
4929 |
+
),
|
4930 |
+
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
4931 |
+
'error'
|
4932 |
+
);
|
4933 |
+
|
4934 |
+
return;
|
4935 |
+
} else {
|
4936 |
+
$is_network_admin = fs_is_network_admin();
|
4937 |
+
|
4938 |
+
if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
|
4939 |
+
// If add-on activated and parent not, automatically install parent for the user.
|
4940 |
+
$this->activate_parent_account( $this->_parent );
|
4941 |
+
} else if (
|
4942 |
+
$this->_parent->is_registered() &&
|
4943 |
+
! $this->is_registered() &&
|
4944 |
+
/**
|
4945 |
+
* If not registered for add-on and the following conditions for the add-on are met, activate add-on account.
|
4946 |
+
* * Network active and in network admin - network activate add-on account.
|
4947 |
+
* * Network active and not in network admin - activate add-on account for the current blog.
|
4948 |
+
* * Not network active and not in network admin - activate add-on account for the current blog.
|
4949 |
+
*
|
4950 |
+
* If not registered for add-on, not network active, and in network admin, do not handle the add-on activation.
|
4951 |
+
*
|
4952 |
+
* @author Leo Fajardo (@leorw)
|
4953 |
+
* @since 2.3.0
|
4954 |
+
*/
|
4955 |
+
( $this->is_network_active() || ! $is_network_admin )
|
4956 |
+
) {
|
4957 |
+
$premium_license = null;
|
4958 |
+
|
4959 |
+
if (
|
4960 |
+
! $this->has_free_plan() &&
|
4961 |
+
$this->is_bundle_license_auto_activation_enabled() &&
|
4962 |
+
$this->_parent->is_activated_with_bundle_license()
|
4963 |
+
) {
|
4964 |
+
/**
|
4965 |
+
* If the add-on has no free plan, try to activate the account only when there's a bundle license.
|
4966 |
+
*
|
4967 |
+
* @author Leo Fajardo (@leorw)
|
4968 |
+
* @since 2.4.0
|
4969 |
+
*/
|
4970 |
+
$bundle_license = $this->get_active_parent_license( $this->_parent->_get_license()->secret_key, false );
|
4971 |
+
|
4972 |
+
if (
|
4973 |
+
is_object( $bundle_license ) &&
|
4974 |
+
! empty( $bundle_license->products ) &&
|
4975 |
+
in_array( $this->get_id(), $bundle_license->products )
|
4976 |
+
) {
|
4977 |
+
$premium_license = $bundle_license;
|
4978 |
+
}
|
4979 |
+
}
|
4980 |
+
|
4981 |
+
if ( $this->has_free_plan() || is_object( $premium_license) ) {
|
4982 |
+
// If parent plugin activated, automatically install add-on for the user.
|
4983 |
+
$this->_activate_addon_account(
|
4984 |
+
$this->_parent,
|
4985 |
+
( $this->is_network_active() && $is_network_admin ) ?
|
4986 |
+
true :
|
4987 |
+
get_current_blog_id(),
|
4988 |
+
$premium_license
|
4989 |
+
);
|
4990 |
+
}
|
4991 |
+
}
|
4992 |
+
|
4993 |
+
// @todo This should be only executed on activation. It should be migrated to register_activation_hook() together with other activation related logic.
|
4994 |
+
if ( $this->is_premium() ) {
|
4995 |
+
// Remove add-on download admin-notice.
|
4996 |
+
$this->_parent->_admin_notices->remove_sticky( array(
|
4997 |
+
'addon_plan_upgraded_' . $this->_slug,
|
4998 |
+
'no_addon_license_' . $this->_slug,
|
4999 |
+
) );
|
5000 |
+
}
|
5001 |
+
|
5002 |
+
// $this->deactivate_premium_only_addon_without_license();
|
5003 |
+
}
|
5004 |
+
}
|
5005 |
+
|
5006 |
+
add_action( 'admin_init', array( &$this, '_admin_init_action' ) );
|
5007 |
+
|
5008 |
+
// if ( $this->is_registered() ||
|
5009 |
+
// $this->is_anonymous() ||
|
5010 |
+
// $this->is_pending_activation()
|
5011 |
+
// ) {
|
5012 |
+
// $this->_init_admin();
|
5013 |
+
// }
|
5014 |
+
}
|
5015 |
+
|
5016 |
+
/**
|
5017 |
+
* Should be called outside `$this->is_user_in_admin()` scope
|
5018 |
+
* because the updater has some logic that needs to be executed
|
5019 |
+
* during AJAX calls.
|
5020 |
+
*
|
5021 |
+
* Currently we need to hook to the `http_request_host_is_external` filter.
|
5022 |
+
* In the future, there might be additional logic added.
|
5023 |
+
*
|
5024 |
+
* @author Vova Feldman
|
5025 |
+
* @since 1.2.1.6
|
5026 |
+
*/
|
5027 |
+
if (
|
5028 |
+
$this->should_use_freemius_updater_and_dialog() &&
|
5029 |
+
(
|
5030 |
+
$this->is_premium() ||
|
5031 |
+
/**
|
5032 |
+
* If not premium but the premium version is installed, also instantiate the updater so that the
|
5033 |
+
* plugin information dialog of the premium version will have the information from the server.
|
5034 |
+
*
|
5035 |
+
* @author Leo Fajardo (@leorw)
|
5036 |
+
* @since 2.2.3
|
5037 |
+
*/
|
5038 |
+
( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->premium_plugin_basename() ) ) )
|
5039 |
+
) &&
|
5040 |
+
$this->has_release_on_freemius()
|
5041 |
+
) {
|
5042 |
+
FS_Plugin_Updater::instance( $this );
|
5043 |
+
}
|
5044 |
+
|
5045 |
+
$this->do_action( 'initiated' );
|
5046 |
+
|
5047 |
+
if ( $this->_storage->prev_is_premium !== $this->_plugin->is_premium ) {
|
5048 |
+
if ( isset( $this->_storage->prev_is_premium ) ) {
|
5049 |
+
$this->apply_filters(
|
5050 |
+
'after_code_type_change',
|
5051 |
+
// New code type.
|
5052 |
+
$this->_plugin->is_premium
|
5053 |
+
);
|
5054 |
+
} else {
|
5055 |
+
// Set for code type for the first time.
|
5056 |
+
$this->_storage->prev_is_premium = $this->_plugin->is_premium;
|
5057 |
+
}
|
5058 |
+
}
|
5059 |
+
|
5060 |
+
if ( ! $this->is_addon() ) {
|
5061 |
+
if ( $this->is_registered() ) {
|
5062 |
+
// Fix for upgrade from versions < 1.0.9.
|
5063 |
+
if ( ! isset( $this->_storage->activation_timestamp ) ) {
|
5064 |
+
$this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME;
|
5065 |
+
}
|
5066 |
+
|
5067 |
+
$this->do_action( 'after_init_plugin_registered' );
|
5068 |
+
} else if ( $this->is_anonymous() ) {
|
5069 |
+
$this->do_action( 'after_init_plugin_anonymous' );
|
5070 |
+
} else if ( $this->is_pending_activation() ) {
|
5071 |
+
$this->do_action( 'after_init_plugin_pending_activations' );
|
5072 |
+
}
|
5073 |
+
} else {
|
5074 |
+
if ( $this->is_registered() ) {
|
5075 |
+
$this->do_action( 'after_init_addon_registered' );
|
5076 |
+
} else if ( $this->is_anonymous() ) {
|
5077 |
+
$this->do_action( 'after_init_addon_anonymous' );
|
5078 |
+
} else if ( $this->is_pending_activation() ) {
|
5079 |
+
$this->do_action( 'after_init_addon_pending_activations' );
|
5080 |
+
}
|
5081 |
+
}
|
5082 |
+
}
|
5083 |
+
|
5084 |
+
/**
|
5085 |
+
* @author Leo Fajardo (@leorw)
|
5086 |
+
* @since 2.2.3
|
5087 |
+
*
|
5088 |
+
* @return bool
|
5089 |
+
*/
|
5090 |
+
private function should_use_freemius_updater_and_dialog() {
|
5091 |
+
return (
|
5092 |
+
/**
|
5093 |
+
* Allow updater and dialog when the `fs_allow_updater_and_dialog` URL query param exists and has `true`
|
5094 |
+
* value, or when the current page is not the "Add Plugins" page (/plugin-install.php) and the `action`
|
5095 |
+
* URL query param doesn't exist or its value is not `install-plugin` so that there will be no conflicts
|
5096 |
+
* with the .org plugins' functionalities (e.g. installation from the "Add Plugins" page and viewing
|
5097 |
+
* plugin details from .org).
|
5098 |
+
*/
|
5099 |
+
( true === fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) ||
|
5100 |
+
(
|
5101 |
+
! self::is_plugin_install_page() &&
|
5102 |
+
// Disallow updater and dialog when installing a plugin, otherwise .org "add-on" plugins will be affected.
|
5103 |
+
( 'install-plugin' !== fs_request_get( 'action' ) )
|
5104 |
+
)
|
5105 |
+
);
|
5106 |
+
}
|
5107 |
+
|
5108 |
+
/**
|
5109 |
+
* @author Leo Fajardo (@leorw)
|
5110 |
+
*
|
5111 |
+
* @since 1.2.1.5
|
5112 |
+
*/
|
5113 |
+
function _stop_tracking_callback() {
|
5114 |
+
$this->_logger->entrance();
|
5115 |
+
|
5116 |
+
$this->check_ajax_referer( 'stop_tracking' );
|
5117 |
+
|
5118 |
+
$result = $this->stop_tracking( fs_is_network_admin() );
|
5119 |
+
|
5120 |
+
if ( true === $result ) {
|
5121 |
+
self::shoot_ajax_success();
|
5122 |
+
}
|
5123 |
+
|
5124 |
+
$this->_logger->api_error( $result );
|
5125 |
+
|
5126 |
+
self::shoot_ajax_failure(
|
5127 |
+
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
|
5128 |
+
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
5129 |
+
$result->error->message :
|
5130 |
+
var_export( $result, true ) )
|
5131 |
+
);
|
5132 |
+
}
|
5133 |
+
|
5134 |
+
/**
|
5135 |
+
* @author Leo Fajardo (@leorw)
|
5136 |
+
* @since 1.2.1.5
|
5137 |
+
*/
|
5138 |
+
function _allow_tracking_callback() {
|
5139 |
+
$this->_logger->entrance();
|
5140 |
+
|
5141 |
+
$this->check_ajax_referer( 'allow_tracking' );
|
5142 |
+
|
5143 |
+
$result = $this->allow_tracking( fs_is_network_admin() );
|
5144 |
+
|
5145 |
+
if ( true === $result ) {
|
5146 |
+
self::shoot_ajax_success();
|
5147 |
+
}
|
5148 |
+
|
5149 |
+
$this->_logger->api_error( $result );
|
5150 |
+
|
5151 |
+
self::shoot_ajax_failure(
|
5152 |
+
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
|
5153 |
+
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
5154 |
+
$result->error->message :
|
5155 |
+
var_export( $result, true ) )
|
5156 |
+
);
|
5157 |
+
}
|
5158 |
+
|
5159 |
+
/**
|
5160 |
+
* Opt-out from usage tracking.
|
5161 |
+
*
|
5162 |
+
* Note: This will not delete the account information but will stop all tracking.
|
5163 |
+
*
|
5164 |
+
* Returns:
|
5165 |
+
* 1. FALSE - If the user never opted-in.
|
5166 |
+
* 2. TRUE - If successfully opted-out.
|
5167 |
+
* 3. object - API result on failure.
|
5168 |
+
*
|
5169 |
+
* @author Leo Fajardo (@leorw)
|
5170 |
+
* @since 1.2.1.5
|
5171 |
+
*
|
5172 |
+
* @return bool|object
|
5173 |
+
*/
|
5174 |
+
function stop_site_tracking() {
|
5175 |
+
$this->_logger->entrance();
|
5176 |
+
|
5177 |
+
if ( ! $this->is_registered() ) {
|
5178 |
+
// User never opted-in.
|
5179 |
+
return false;
|
5180 |
+
}
|
5181 |
+
|
5182 |
+
if ( $this->is_tracking_prohibited() ) {
|
5183 |
+
// Already disconnected.
|
5184 |
+
return true;
|
5185 |
+
}
|
5186 |
+
|
5187 |
+
// Send update to FS.
|
5188 |
+
$result = $this->get_api_site_scope()->call( '/?fields=is_disconnected', 'put', array(
|
5189 |
+
'is_disconnected' => true
|
5190 |
+
) );
|
5191 |
+
|
5192 |
+
if ( ! $this->is_api_result_entity( $result ) ||
|
5193 |
+
! isset( $result->is_disconnected ) ||
|
5194 |
+
! $result->is_disconnected
|
5195 |
+
) {
|
5196 |
+
$this->_logger->api_error( $result );
|
5197 |
+
|
5198 |
+
return $result;
|
5199 |
+
}
|
5200 |
+
|
5201 |
+
$this->_site->is_disconnected = $result->is_disconnected;
|
5202 |
+
$this->_store_site();
|
5203 |
+
|
5204 |
+
$this->clear_sync_cron();
|
5205 |
+
|
5206 |
+
// Successfully disconnected.
|
5207 |
+
return true;
|
5208 |
+
}
|
5209 |
+
|
5210 |
+
/**
|
5211 |
+
* Opt-out network from usage tracking.
|
5212 |
+
*
|
5213 |
+
* Note: This will not delete the account information but will stop all tracking.
|
5214 |
+
*
|
5215 |
+
* Returns:
|
5216 |
+
* 1. FALSE - If the user never opted-in.
|
5217 |
+
* 2. TRUE - If successfully opted-out.
|
5218 |
+
* 3. object - API result on failure.
|
5219 |
+
*
|
5220 |
+
* @author Leo Fajardo (@leorw)
|
5221 |
+
* @since 1.2.1.5
|
5222 |
+
*
|
5223 |
+
* @return bool|object
|
5224 |
+
*/
|
5225 |
+
function stop_network_tracking() {
|
5226 |
+
$this->_logger->entrance();
|
5227 |
+
|
5228 |
+
if ( ! $this->is_registered() ) {
|
5229 |
+
// User never opted-in.
|
5230 |
+
return false;
|
5231 |
+
}
|
5232 |
+
|
5233 |
+
$install_id_2_blog_id = array();
|
5234 |
+
$installs_map = $this->get_blog_install_map();
|
5235 |
+
|
5236 |
+
$opt_out_all = true;
|
5237 |
+
|
5238 |
+
$params = array();
|
5239 |
+
foreach ( $installs_map as $blog_id => $install ) {
|
5240 |
+
if ( $install->is_tracking_prohibited() ) {
|
5241 |
+
// Already opted-out.
|
5242 |
+
continue;
|
5243 |
+
}
|
5244 |
+
|
5245 |
+
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
5246 |
+
// Opt-out only from non-delegated installs.
|
5247 |
+
$opt_out_all = false;
|
5248 |
+
continue;
|
5249 |
+
}
|
5250 |
+
|
5251 |
+
$params[] = array( 'id' => $install->id );
|
5252 |
+
|
5253 |
+
$install_id_2_blog_id[ $install->id ] = $blog_id;
|
5254 |
+
}
|
5255 |
+
|
5256 |
+
if ( empty( $install_id_2_blog_id ) ) {
|
5257 |
+
return true;
|
5258 |
+
}
|
5259 |
+
|
5260 |
+
$params[] = array( 'is_disconnected' => true );
|
5261 |
+
|
5262 |
+
// Send update to FS.
|
5263 |
+
$result = $this->get_current_or_network_user_api_scope()->call( "/plugins/{$this->_module_id}/installs.json", 'put', $params );
|
5264 |
+
|
5265 |
+
if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
|
5266 |
+
$this->_logger->api_error( $result );
|
5267 |
+
|
5268 |
+
return $result;
|
5269 |
+
}
|
5270 |
+
|
5271 |
+
foreach ( $result->installs as $r_install ) {
|
5272 |
+
$blog_id = $install_id_2_blog_id[ $r_install->id ];
|
5273 |
+
$install = $installs_map[ $blog_id ];
|
5274 |
+
$install->is_disconnected = $r_install->is_disconnected;
|
5275 |
+
$this->_store_site( true, $blog_id, $install );
|
5276 |
+
}
|
5277 |
+
|
5278 |
+
$this->clear_sync_cron( $opt_out_all );
|
5279 |
+
|
5280 |
+
// Successfully disconnected.
|
5281 |
+
return true;
|
5282 |
+
}
|
5283 |
+
|
5284 |
+
/**
|
5285 |
+
* Opt-out from usage tracking.
|
5286 |
+
*
|
5287 |
+
* Note: This will not delete the account information but will stop all tracking.
|
5288 |
+
*
|
5289 |
+
* Returns:
|
5290 |
+
* 1. FALSE - If the user never opted-in.
|
5291 |
+
* 2. TRUE - If successfully opted-out.
|
5292 |
+
* 3. object - API result on failure.
|
5293 |
+
*
|
5294 |
+
* @author Leo Fajardo (@leorw)
|
5295 |
+
* @since 1.2.1.5
|
5296 |
+
*
|
5297 |
+
* @param bool $is_network_action
|
5298 |
+
*
|
5299 |
+
* @return bool|object
|
5300 |
+
*/
|
5301 |
+
function stop_tracking( $is_network_action = false ) {
|
5302 |
+
$this->_logger->entrance();
|
5303 |
+
|
5304 |
+
return $is_network_action ?
|
5305 |
+
$this->stop_network_tracking() :
|
5306 |
+
$this->stop_site_tracking();
|
5307 |
+
}
|
5308 |
+
|
5309 |
+
/**
|
5310 |
+
* Opt-in back into usage tracking.
|
5311 |
+
*
|
5312 |
+
* Note: This will only work if the user opted-in previously.
|
5313 |
+
*
|
5314 |
+
* Returns:
|
5315 |
+
* 1. FALSE - If the user never opted-in.
|
5316 |
+
* 2. TRUE - If successfully opted-in back to usage tracking.
|
5317 |
+
* 3. object - API result on failure.
|
5318 |
+
*
|
5319 |
+
* @author Leo Fajardo (@leorw)
|
5320 |
+
* @since 1.2.1.5
|
5321 |
+
*
|
5322 |
+
* @return bool|object
|
5323 |
+
*/
|
5324 |
+
function allow_site_tracking() {
|
5325 |
+
$this->_logger->entrance();
|
5326 |
+
|
5327 |
+
if ( ! $this->is_registered() ) {
|
5328 |
+
// User never opted-in.
|
5329 |
+
return false;
|
5330 |
+
}
|
5331 |
+
|
5332 |
+
if ( $this->is_tracking_allowed() ) {
|
5333 |
+
// Tracking already allowed.
|
5334 |
+
return true;
|
5335 |
+
}
|
5336 |
+
|
5337 |
+
$result = $this->get_api_site_scope()->call( '/?is_disconnected', 'put', array(
|
5338 |
+
'is_disconnected' => false
|
5339 |
+
) );
|
5340 |
+
|
5341 |
+
if ( ! $this->is_api_result_entity( $result ) ||
|
5342 |
+
! isset( $result->is_disconnected ) ||
|
5343 |
+
$result->is_disconnected
|
5344 |
+
) {
|
5345 |
+
$this->_logger->api_error( $result );
|
5346 |
+
|
5347 |
+
return $result;
|
5348 |
+
}
|
5349 |
+
|
5350 |
+
$this->_site->is_disconnected = $result->is_disconnected;
|
5351 |
+
$this->_store_site();
|
5352 |
+
|
5353 |
+
$this->schedule_sync_cron();
|
5354 |
+
|
5355 |
+
// Successfully reconnected.
|
5356 |
+
return true;
|
5357 |
+
}
|
5358 |
+
|
5359 |
+
/**
|
5360 |
+
* Opt-in network back into usage tracking.
|
5361 |
+
*
|
5362 |
+
* Note: This will only work if the user opted-in previously.
|
5363 |
+
*
|
5364 |
+
* Returns:
|
5365 |
+
* 1. FALSE - If the user never opted-in.
|
5366 |
+
* 2. TRUE - If successfully opted-in back to usage tracking.
|
5367 |
+
* 3. object - API result on failure.
|
5368 |
+
*
|
5369 |
+
* @author Leo Fajardo (@leorw)
|
5370 |
+
* @since 1.2.1.5
|
5371 |
+
*
|
5372 |
+
* @return bool|object
|
5373 |
+
*/
|
5374 |
+
function allow_network_tracking() {
|
5375 |
+
$this->_logger->entrance();
|
5376 |
+
|
5377 |
+
if ( ! $this->is_registered() ) {
|
5378 |
+
// User never opted-in.
|
5379 |
+
return false;
|
5380 |
+
}
|
5381 |
+
|
5382 |
+
$install_id_2_blog_id = array();
|
5383 |
+
$installs_map = $this->get_blog_install_map();
|
5384 |
+
|
5385 |
+
$params = array();
|
5386 |
+
foreach ( $installs_map as $blog_id => $install ) {
|
5387 |
+
if ( $install->is_tracking_allowed() ) {
|
5388 |
+
continue;
|
5389 |
+
}
|
5390 |
+
|
5391 |
+
$params[] = array( 'id' => $install->id );
|
5392 |
+
|
5393 |
+
$install_id_2_blog_id[ $install->id ] = $blog_id;
|
5394 |
+
}
|
5395 |
+
|
5396 |
+
if ( empty( $install_id_2_blog_id ) ) {
|
5397 |
+
return true;
|
5398 |
+
}
|
5399 |
+
|
5400 |
+
$params[] = array( 'is_disconnected' => false );
|
5401 |
+
|
5402 |
+
// Send update to FS.
|
5403 |
+
$result = $this->get_current_or_network_user_api_scope()->call( "/plugins/{$this->_module_id}/installs.json", 'put', $params );
|
5404 |
+
|
5405 |
+
|
5406 |
+
if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
|
5407 |
+
$this->_logger->api_error( $result );
|
5408 |
+
|
5409 |
+
return $result;
|
5410 |
+
}
|
5411 |
+
|
5412 |
+
foreach ( $result->installs as $r_install ) {
|
5413 |
+
$blog_id = $install_id_2_blog_id[ $r_install->id ];
|
5414 |
+
$install = $installs_map[ $blog_id ];
|
5415 |
+
$install->is_disconnected = $r_install->is_disconnected;
|
5416 |
+
$this->_store_site( true, $blog_id, $install );
|
5417 |
+
}
|
5418 |
+
|
5419 |
+
$this->schedule_sync_cron();
|
5420 |
+
|
5421 |
+
// Successfully reconnected.
|
5422 |
+
return true;
|
5423 |
+
}
|
5424 |
+
|
5425 |
+
/**
|
5426 |
+
* Opt-in back into usage tracking.
|
5427 |
+
*
|
5428 |
+
* Note: This will only work if the user opted-in previously.
|
5429 |
+
*
|
5430 |
+
* Returns:
|
5431 |
+
* 1. FALSE - If the user never opted-in.
|
5432 |
+
* 2. TRUE - If successfully opted-in back to usage tracking.
|
5433 |
+
* 3. object - API result on failure.
|
5434 |
+
*
|
5435 |
+
* @author Leo Fajardo (@leorw)
|
5436 |
+
* @since 1.2.1.5
|
5437 |
+
*
|
5438 |
+
* @param bool $is_network_action
|
5439 |
+
*
|
5440 |
+
* @return bool|object
|
5441 |
+
*/
|
5442 |
+
function allow_tracking( $is_network_action = false ) {
|
5443 |
+
$this->_logger->entrance();
|
5444 |
+
|
5445 |
+
return $is_network_action ?
|
5446 |
+
$this->allow_network_tracking() :
|
5447 |
+
$this->allow_site_tracking();
|
5448 |
+
}
|
5449 |
+
|
5450 |
+
/**
|
5451 |
+
* If user opted-in and later disabled usage-tracking,
|
5452 |
+
* re-allow tracking for licensing and updates.
|
5453 |
+
*
|
5454 |
+
* @author Leo Fajardo (@leorw)
|
5455 |
+
* @since 1.2.1.5
|
5456 |
+
*
|
5457 |
+
* @param bool $is_context_single_site
|
5458 |
+
*/
|
5459 |
+
private function reconnect_locally( $is_context_single_site = false ) {
|
5460 |
+
$this->_logger->entrance();
|
5461 |
+
|
5462 |
+
if ( ! $this->is_registered() ) {
|
5463 |
+
return;
|
5464 |
+
}
|
5465 |
+
|
5466 |
+
if ( ! fs_is_network_admin() || $is_context_single_site ) {
|
5467 |
+
if ( $this->is_tracking_prohibited() ) {
|
5468 |
+
$this->_site->is_disconnected = false;
|
5469 |
+
$this->_store_site();
|
5470 |
+
}
|
5471 |
+
} else {
|
5472 |
+
$installs_map = $this->get_blog_install_map();
|
5473 |
+
foreach ( $installs_map as $blog_id => $install ) {
|
5474 |
+
/**
|
5475 |
+
* @var FS_Site $install
|
5476 |
+
*/
|
5477 |
+
if ( $install->is_tracking_prohibited() ) {
|
5478 |
+
$install->is_disconnected = false;
|
5479 |
+
$this->_store_site( true, $blog_id, $install );
|
5480 |
+
}
|
5481 |
+
}
|
5482 |
+
}
|
5483 |
+
}
|
5484 |
+
|
5485 |
+
/**
|
5486 |
+
* @author Vova Feldman (@svovaf)
|
5487 |
+
* @since 2.3.2
|
5488 |
+
*
|
5489 |
+
* @return bool
|
5490 |
+
*/
|
5491 |
+
function is_extensions_tracking_allowed() {
|
5492 |
+
return ( true === $this->apply_filters(
|
5493 |
+
'is_extensions_tracking_allowed',
|
5494 |
+
$this->_storage->get( 'is_extensions_tracking_allowed', null )
|
5495 |
+
) );
|
5496 |
+
}
|
5497 |
+
|
5498 |
+
/**
|
5499 |
+
* @author Vova Feldman (@svovaf)
|
5500 |
+
* @since 2.3.2
|
5501 |
+
*/
|
5502 |
+
function _update_tracking_permission_callback() {
|
5503 |
+
$this->_logger->entrance();
|
5504 |
+
|
5505 |
+
$this->check_ajax_referer( 'update_tracking_permission' );
|
5506 |
+
|
5507 |
+
$is_enabled = fs_request_get_bool( 'is_enabled', null );
|
5508 |
+
|
5509 |
+
if ( ! is_bool( $is_enabled ) ) {
|
5510 |
+
self::shoot_ajax_failure();
|
5511 |
+
}
|
5512 |
+
|
5513 |
+
$permission = fs_request_get( 'permission' );
|
5514 |
+
|
5515 |
+
switch ( $permission ) {
|
5516 |
+
case 'extensions':
|
5517 |
+
$this->update_extensions_tracking_flag( $is_enabled );
|
5518 |
+
break;
|
5519 |
+
default:
|
5520 |
+
$permission = 'no_match';
|
5521 |
+
}
|
5522 |
+
|
5523 |
+
if ( 'no_match' === $permission ) {
|
5524 |
+
self::shoot_ajax_failure();
|
5525 |
+
}
|
5526 |
+
|
5527 |
+
self::shoot_ajax_success( array(
|
5528 |
+
'permissions' => array(
|
5529 |
+
$permission => $is_enabled,
|
5530 |
+
)
|
5531 |
+
) );
|
5532 |
+
}
|
5533 |
+
|
5534 |
+
/**
|
5535 |
+
* @author Leo Fajardo (@leorw)
|
5536 |
+
* @since 2.3.2
|
5537 |
+
*
|
5538 |
+
* @param bool|null $is_enabled
|
5539 |
+
*/
|
5540 |
+
function update_extensions_tracking_flag( $is_enabled ) {
|
5541 |
+
if ( is_bool( $is_enabled ) ) {
|
5542 |
+
$this->_storage->store( 'is_extensions_tracking_allowed', $is_enabled );
|
5543 |
+
}
|
5544 |
+
}
|
5545 |
+
|
5546 |
+
/**
|
5547 |
+
* Parse plugin's settings (as defined by the plugin dev).
|
5548 |
+
*
|
5549 |
+
* @author Vova Feldman (@svovaf)
|
5550 |
+
* @since 1.1.7.3
|
5551 |
+
*
|
5552 |
+
* @param array $plugin_info
|
5553 |
+
*
|
5554 |
+
* @throws \Freemius_Exception
|
5555 |
+
*/
|
5556 |
+
private function parse_settings( &$plugin_info ) {
|
5557 |
+
$this->_logger->entrance();
|
5558 |
+
|
5559 |
+
$id = $this->get_numeric_option( $plugin_info, 'id', false );
|
5560 |
+
$public_key = $this->get_option( $plugin_info, 'public_key', false );
|
5561 |
+
$secret_key = $this->get_option( $plugin_info, 'secret_key', null );
|
5562 |
+
$parent_id = $this->get_numeric_option( $plugin_info, 'parent_id', null );
|
5563 |
+
$parent_name = $this->get_option( $plugin_info, 'parent_name', null );
|
5564 |
+
|
5565 |
+
/**
|
5566 |
+
* @author Vova Feldman (@svovaf)
|
5567 |
+
* @since 1.1.9 Try to pull secret key from external config.
|
5568 |
+
*/
|
5569 |
+
if ( is_null( $secret_key ) && defined( "WP_FS__{$this->_slug}_SECRET_KEY" ) ) {
|
5570 |
+
$secret_key = constant( "WP_FS__{$this->_slug}_SECRET_KEY" );
|
5571 |
+
}
|
5572 |
+
|
5573 |
+
if ( isset( $plugin_info['parent'] ) ) {
|
5574 |
+
$parent_id = $this->get_numeric_option( $plugin_info['parent'], 'id', null );
|
5575 |
+
// $parent_slug = $this->get_option( $plugin_info['parent'], 'slug', null );
|
5576 |
+
// $parent_public_key = $this->get_option( $plugin_info['parent'], 'public_key', null );
|
5577 |
+
// $parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
|
5578 |
+
}
|
5579 |
+
|
5580 |
+
if ( false === $id ) {
|
5581 |
+
throw new Freemius_Exception( array(
|
5582 |
+
'error' => array(
|
5583 |
+
'type' => 'ParameterNotSet',
|
5584 |
+
'message' => 'Plugin id parameter is not set.',
|
5585 |
+
'code' => 'plugin_id_not_set',
|
5586 |
+
'http' => 500,
|
5587 |
+
)
|
5588 |
+
) );
|
5589 |
+
}
|
5590 |
+
if ( false === $public_key ) {
|
5591 |
+
throw new Freemius_Exception( array(
|
5592 |
+
'error' => array(
|
5593 |
+
'type' => 'ParameterNotSet',
|
5594 |
+
'message' => 'Plugin public_key parameter is not set.',
|
5595 |
+
'code' => 'plugin_public_key_not_set',
|
5596 |
+
'http' => 500,
|
5597 |
+
)
|
5598 |
+
) );
|
5599 |
+
}
|
5600 |
+
|
5601 |
+
$plugin = ( $this->_plugin instanceof FS_Plugin ) ?
|
5602 |
+
$this->_plugin :
|
5603 |
+
new FS_Plugin();
|
5604 |
+
|
5605 |
+
$premium_suffix = $this->get_option( $plugin_info, 'premium_suffix', '(Premium)' );
|
5606 |
+
|
5607 |
+
$plugin->update( array(
|
5608 |
+
'id' => $id,
|
5609 |
+
'type' => $this->get_option( $plugin_info, 'type', $this->_module_type ),
|
5610 |
+
'public_key' => $public_key,
|
5611 |
+
'slug' => $this->_slug,
|
5612 |
+
'premium_slug' => $this->get_option( $plugin_info, 'premium_slug', "{$this->_slug}-premium" ),
|
5613 |
+
'parent_plugin_id' => $parent_id,
|
5614 |
+
'version' => $this->get_plugin_version(),
|
5615 |
+
'title' => $this->get_plugin_name( $premium_suffix ),
|
5616 |
+
'file' => $this->_plugin_basename,
|
5617 |
+
'is_premium' => $this->get_bool_option( $plugin_info, 'is_premium', true ),
|
5618 |
+
'premium_suffix' => $premium_suffix,
|
5619 |
+
'is_live' => $this->get_bool_option( $plugin_info, 'is_live', true ),
|
5620 |
+
'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
|
5621 |
+
'bundle_id' => $this->get_option( $plugin_info, 'bundle_id', null ),
|
5622 |
+
'bundle_public_key' => $this->get_option( $plugin_info, 'bundle_public_key', null ),
|
5623 |
+
) );
|
5624 |
+
|
5625 |
+
if ( $plugin->is_updated() ) {
|
5626 |
+
// Update plugin details.
|
5627 |
+
$this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->store( $plugin );
|
5628 |
+
}
|
5629 |
+
// Set the secret key after storing the plugin, we don't want to store the key in the storage.
|
5630 |
+
$this->_plugin->secret_key = $secret_key;
|
5631 |
+
|
5632 |
+
/**
|
5633 |
+
* If the product is network integrated and activated and the current view is in the network level Admin dashboard, if the product's network-level menu located differently from the sub-site level, then use the network menu details (when set).
|
5634 |
+
*
|
5635 |
+
* @author Vova Feldman
|
5636 |
+
* @since 2.4.5
|
5637 |
+
*/
|
5638 |
+
if ( $this->is_network_active() && fs_is_network_admin() ) {
|
5639 |
+
if ( isset( $plugin_info['menu_network'] ) &&
|
5640 |
+
is_array( $plugin_info['menu_network'] ) &&
|
5641 |
+
! empty( $plugin_info['menu_network'] )
|
5642 |
+
) {
|
5643 |
+
$plugin_info['menu'] = $plugin_info['menu_network'];
|
5644 |
+
}
|
5645 |
+
}
|
5646 |
+
|
5647 |
+
if ( ! isset( $plugin_info['menu'] ) ) {
|
5648 |
+
$plugin_info['menu'] = array();
|
5649 |
+
|
5650 |
+
if ( ! empty( $this->_storage->sdk_last_version ) &&
|
5651 |
+
version_compare( $this->_storage->sdk_last_version, '1.1.2', '<=' )
|
5652 |
+
) {
|
5653 |
+
// Backward compatibility to 1.1.2
|
5654 |
+
$plugin_info['menu']['slug'] = isset( $plugin_info['menu_slug'] ) ?
|
5655 |
+
$plugin_info['menu_slug'] :
|
5656 |
+
$this->_slug;
|
5657 |
+
}
|
5658 |
+
}
|
5659 |
+
|
5660 |
+
$this->_menu = FS_Admin_Menu_Manager::instance(
|
5661 |
+
$this->_module_id,
|
5662 |
+
$this->_module_type,
|
5663 |
+
$this->get_unique_affix()
|
5664 |
+
);
|
5665 |
+
|
5666 |
+
$this->_menu->init( $plugin_info['menu'], $this->is_addon() );
|
5667 |
+
|
5668 |
+
$this->_has_addons = $this->get_bool_option( $plugin_info, 'has_addons', false );
|
5669 |
+
$this->_has_paid_plans = $this->get_bool_option( $plugin_info, 'has_paid_plans', true );
|
5670 |
+
$this->_has_premium_version = $this->get_bool_option( $plugin_info, 'has_premium_version', $this->_has_paid_plans );
|
5671 |
+
$this->_ignore_pending_mode = $this->get_bool_option( $plugin_info, 'ignore_pending_mode', false );
|
5672 |
+
$this->_is_org_compliant = $this->get_bool_option( $plugin_info, 'is_org_compliant', true );
|
5673 |
+
$this->_is_premium_only = $this->get_bool_option( $plugin_info, 'is_premium_only', false );
|
5674 |
+
if ( $this->_is_premium_only ) {
|
5675 |
+
// If premium only plugin, disable anonymous mode.
|
5676 |
+
$this->_enable_anonymous = false;
|
5677 |
+
$this->_anonymous_mode = false;
|
5678 |
+
} else {
|
5679 |
+
$this->_enable_anonymous = $this->get_bool_option( $plugin_info, 'enable_anonymous', true );
|
5680 |
+
$this->_anonymous_mode = $this->get_bool_option( $plugin_info, 'anonymous_mode', false );
|
5681 |
+
}
|
5682 |
+
$this->_permissions = $this->get_option( $plugin_info, 'permissions', array() );
|
5683 |
+
$this->_is_bundle_license_auto_activation_enabled = $this->get_option( $plugin_info, 'bundle_license_auto_activation', false );
|
5684 |
+
|
5685 |
+
if ( ! empty( $plugin_info['trial'] ) ) {
|
5686 |
+
$this->_trial_days = $this->get_numeric_option(
|
5687 |
+
$plugin_info['trial'],
|
5688 |
+
'days',
|
5689 |
+
// Default to 0 - trial without days specification.
|
5690 |
+
0
|
5691 |
+
);
|
5692 |
+
|
5693 |
+
$this->_is_trial_require_payment = $this->get_bool_option( $plugin_info['trial'], 'is_require_payment', false );
|
5694 |
+
}
|
5695 |
+
|
5696 |
+
$this->_navigation = $this->get_option(
|
5697 |
+
$plugin_info,
|
5698 |
+
'navigation',
|
5699 |
+
$this->is_free_wp_org_theme() ?
|
5700 |
+
self::NAVIGATION_TABS :
|
5701 |
+
self::NAVIGATION_MENU
|
5702 |
+
);
|
5703 |
+
}
|
5704 |
+
|
5705 |
+
/**
|
5706 |
+
* @param string[] $options
|
5707 |
+
* @param string $key
|
5708 |
+
* @param mixed $default
|
5709 |
+
*
|
5710 |
+
* @return bool
|
5711 |
+
*/
|
5712 |
+
private function get_option( &$options, $key, $default = false ) {
|
5713 |
+
return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
|
5714 |
+
}
|
5715 |
+
|
5716 |
+
private function get_bool_option( &$options, $key, $default = false ) {
|
5717 |
+
return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
|
5718 |
+
}
|
5719 |
+
|
5720 |
+
private function get_numeric_option( &$options, $key, $default = false ) {
|
5721 |
+
return isset( $options[ $key ] ) && is_numeric( $options[ $key ] ) ? $options[ $key ] : $default;
|
5722 |
+
}
|
5723 |
+
|
5724 |
+
/**
|
5725 |
+
* Gate keeper.
|
5726 |
+
*
|
5727 |
+
* @author Vova Feldman (@svovaf)
|
5728 |
+
* @since 1.1.7.3
|
5729 |
+
*
|
5730 |
+
* @return bool
|
5731 |
+
*/
|
5732 |
+
private function should_stop_execution() {
|
5733 |
+
if ( empty( $this->_storage->was_plugin_loaded ) ) {
|
5734 |
+
/**
|
5735 |
+
* Don't execute Freemius until plugin was fully loaded at least once,
|
5736 |
+
* to give the opportunity for the activation hook to run before pinging
|
5737 |
+
* the API for connectivity test. This logic is relevant for the
|
5738 |
+
* identification of new plugin install vs. plugin update.
|
5739 |
+
*
|
5740 |
+
* @author Vova Feldman (@svovaf)
|
5741 |
+
* @since 1.1.9
|
5742 |
+
*/
|
5743 |
+
return true;
|
5744 |
+
}
|
5745 |
+
|
5746 |
+
if ( $this->is_activation_mode() ) {
|
5747 |
+
if ( ! is_admin() ) {
|
5748 |
+
/**
|
5749 |
+
* If in activation mode, don't execute Freemius outside of the
|
5750 |
+
* admin dashboard.
|
5751 |
+
*
|
5752 |
+
* @author Vova Feldman (@svovaf)
|
5753 |
+
* @since 1.1.7.3
|
5754 |
+
*/
|
5755 |
+
return true;
|
5756 |
+
}
|
5757 |
+
|
5758 |
+
if ( ! WP_FS__IS_HTTP_REQUEST ) {
|
5759 |
+
/**
|
5760 |
+
* If in activation and executed without HTTP context (e.g. CLI, Cronjob),
|
5761 |
+
* then don't start Freemius.
|
5762 |
+
*
|
5763 |
+
* @author Vova Feldman (@svovaf)
|
5764 |
+
* @since 1.1.6.3
|
5765 |
+
*
|
5766 |
+
* @link https://wordpress.org/support/topic/errors-in-the-freemius-class-when-running-in-wordpress-in-cli
|
5767 |
+
*/
|
5768 |
+
return true;
|
5769 |
+
}
|
5770 |
+
|
5771 |
+
if ( self::is_cron() ) {
|
5772 |
+
/**
|
5773 |
+
* If in activation mode, don't execute Freemius during wp crons
|
5774 |
+
* (wp crons have HTTP context - called as HTTP request).
|
5775 |
+
*
|
5776 |
+
* @author Vova Feldman (@svovaf)
|
5777 |
+
* @since 1.1.7.3
|
5778 |
+
*/
|
5779 |
+
return true;
|
5780 |
+
}
|
5781 |
+
|
5782 |
+
if ( self::is_ajax() &&
|
5783 |
+
! $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) &&
|
5784 |
+
! $this->_admin_notices->has_sticky( 'failed_connect_api' )
|
5785 |
+
) {
|
5786 |
+
/**
|
5787 |
+
* During activation, if running in AJAX mode, unless there's a sticky
|
5788 |
+
* connectivity issue notice, don't run Freemius.
|
5789 |
+
*
|
5790 |
+
* @author Vova Feldman (@svovaf)
|
5791 |
+
* @since 1.1.7.3
|
5792 |
+
*/
|
5793 |
+
return true;
|
5794 |
+
}
|
5795 |
+
}
|
5796 |
+
|
5797 |
+
return false;
|
5798 |
+
}
|
5799 |
+
|
5800 |
+
/**
|
5801 |
+
* Triggered after code type has changed.
|
5802 |
+
*
|
5803 |
+
* @author Vova Feldman (@svovaf)
|
5804 |
+
* @since 1.1.9.1
|
5805 |
+
*/
|
5806 |
+
function _after_code_type_change() {
|
5807 |
+
$this->_logger->entrance();
|
5808 |
+
|
5809 |
+
if ( $this->is_theme() ) {
|
5810 |
+
// Expire the cache of the previous tabs since the theme may
|
5811 |
+
// have setting updates after code type has changed.
|
5812 |
+
$this->_cache->expire( 'tabs' );
|
5813 |
+
$this->_cache->expire( 'tabs_stylesheets' );
|
5814 |
+
}
|
5815 |
+
|
5816 |
+
if ( $this->is_registered() ) {
|
5817 |
+
if ( ! $this->is_addon() ) {
|
5818 |
+
add_action(
|
5819 |
+
is_admin() ? 'admin_init' : 'init',
|
5820 |
+
array( &$this, '_plugin_code_type_changed' )
|
5821 |
+
);
|
5822 |
+
}
|
5823 |
+
|
5824 |
+
if ( $this->is_premium() ) {
|
5825 |
+
// Purge cached payments after switching to the premium version.
|
5826 |
+
// @todo This logic doesn't handle purging the cache for serviceware module upgrade.
|
5827 |
+
$this->get_api_user_scope()->purge_cache( "/plugins/{$this->_module_id}/payments.json?include_addons=true" );
|
5828 |
+
}
|
5829 |
+
}
|
5830 |
+
}
|
5831 |
+
|
5832 |
+
/**
|
5833 |
+
* Handles plugin's code type change (free <--> premium).
|
5834 |
+
*
|
5835 |
+
* @author Vova Feldman (@svovaf)
|
5836 |
+
* @since 1.0.9
|
5837 |
+
*/
|
5838 |
+
function _plugin_code_type_changed() {
|
5839 |
+
$this->_logger->entrance();
|
5840 |
+
|
5841 |
+
if ( $this->is_premium() ) {
|
5842 |
+
$this->reconnect_locally();
|
5843 |
+
|
5844 |
+
// Activated premium code.
|
5845 |
+
$this->do_action( 'after_premium_version_activation' );
|
5846 |
+
|
5847 |
+
// Remove all sticky messages related to download of the premium version.
|
5848 |
+
$this->_admin_notices->remove_sticky( array(
|
5849 |
+
'trial_started',
|
5850 |
+
'plan_upgraded',
|
5851 |
+
'plan_changed',
|
5852 |
+
'license_activated',
|
5853 |
+
) );
|
5854 |
+
|
5855 |
+
$notice = '';
|
5856 |
+
if ( ! $this->is_only_premium() ) {
|
5857 |
+
$notice = sprintf( $this->get_text_inline( 'Premium %s version was successfully activated.', 'premium-activated-message' ), $this->_module_type );
|
5858 |
+
}
|
5859 |
+
|
5860 |
+
$license_notice = $this->get_license_network_activation_notice();
|
5861 |
+
if ( ! empty( $license_notice ) ) {
|
5862 |
+
$notice .= ' ' . $license_notice;
|
5863 |
+
}
|
5864 |
+
|
5865 |
+
if ( ! empty( $notice ) ) {
|
5866 |
+
$this->_admin_notices->add_sticky(
|
5867 |
+
trim( $notice ),
|
5868 |
+
'premium_activated',
|
5869 |
+
$this->get_text_x_inline( 'W00t',
|
5870 |
+
'Used to express elation, enthusiasm, or triumph (especially in electronic communication).', 'woot' ) . '!'
|
5871 |
+
);
|
5872 |
+
}
|
5873 |
+
} else {
|
5874 |
+
// Remove sticky message related to premium code activation.
|
5875 |
+
$this->_admin_notices->remove_sticky( 'premium_activated' );
|
5876 |
+
|
5877 |
+
// Activated free code (after had the premium before).
|
5878 |
+
$this->do_action( 'after_free_version_reactivation' );
|
5879 |
+
|
5880 |
+
if ( $this->is_paying() && ! $this->is_premium() ) {
|
5881 |
+
$this->_admin_notices->add_sticky(
|
5882 |
+
sprintf(
|
5883 |
+
/* translators: %s: License type (e.g. you have a professional license) */
|
5884 |
+
$this->get_text_inline( 'You have a %s license.', 'you-have-x-license' ),
|
5885 |
+
$this->get_plan_title()
|
5886 |
+
) . $this->get_complete_upgrade_instructions(),
|
5887 |
+
'plan_upgraded',
|
5888 |
+
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
5889 |
+
);
|
5890 |
+
}
|
5891 |
+
}
|
5892 |
+
|
5893 |
+
// Schedule code type changes event.
|
5894 |
+
$this->schedule_install_sync();
|
5895 |
+
|
5896 |
+
/**
|
5897 |
+
* Unregister the uninstall hook for the other version of the plugin (with different code type) to avoid
|
5898 |
+
* triggering a fatal error when uninstalling that plugin. For example, after deactivating the "free" version
|
5899 |
+
* of a specific plugin, its uninstall hook should be unregistered after the "premium" version has been
|
5900 |
+
* activated. If we don't do that, a fatal error will occur when we try to uninstall the "free" version since
|
5901 |
+
* the main file of the "free" version will be loaded first before calling the hooked callback. Since the
|
5902 |
+
* free and premium versions are almost identical (same class or have same functions), a fatal error like
|
5903 |
+
* "Cannot redeclare class MyClass" or "Cannot redeclare my_function()" will occur.
|
5904 |
+
*/
|
5905 |
+
$this->unregister_uninstall_hook();
|
5906 |
+
|
5907 |
+
$this->clear_module_main_file_cache();
|
5908 |
+
|
5909 |
+
// Update is_premium of latest version.
|
5910 |
+
$this->_storage->prev_is_premium = $this->_plugin->is_premium;
|
5911 |
+
}
|
5912 |
+
|
5913 |
+
#endregion
|
5914 |
+
|
5915 |
+
#----------------------------------------------------------------------------------
|
5916 |
+
#region Add-ons
|
5917 |
+
#----------------------------------------------------------------------------------
|
5918 |
+
|
5919 |
+
/**
|
5920 |
+
* Check if add-on installed and activated on site.
|
5921 |
+
*
|
5922 |
+
* @author Vova Feldman (@svovaf)
|
5923 |
+
* @since 1.0.6
|
5924 |
+
*
|
5925 |
+
* @param string|number $id_or_slug
|
5926 |
+
* @param bool|null $is_premium Since 1.2.1.7 can check for specified add-on version.
|
5927 |
+
*
|
5928 |
+
* @return bool
|
5929 |
+
*/
|
5930 |
+
function is_addon_activated( $id_or_slug, $is_premium = null ) {
|
5931 |
+
$this->_logger->entrance();
|
5932 |
+
|
5933 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
5934 |
+
$is_activated = self::has_instance( $addon_id );
|
5935 |
+
|
5936 |
+
if ( ! $is_activated ) {
|
5937 |
+
return false;
|
5938 |
+
}
|
5939 |
+
|
5940 |
+
if ( is_bool( $is_premium ) ) {
|
5941 |
+
// Check if the specified code version is activate.
|
5942 |
+
$addon = $this->get_addon_instance( $addon_id );
|
5943 |
+
$is_activated = ( $is_premium === $addon->is_premium() );
|
5944 |
+
}
|
5945 |
+
|
5946 |
+
return $is_activated;
|
5947 |
+
}
|
5948 |
+
|
5949 |
+
/**
|
5950 |
+
* Check if add-on was connected to install
|
5951 |
+
*
|
5952 |
+
* @author Vova Feldman (@svovaf)
|
5953 |
+
* @since 1.1.7
|
5954 |
+
*
|
5955 |
+
* @param string|number $id_or_slug
|
5956 |
+
*
|
5957 |
+
* @return bool
|
5958 |
+
*/
|
5959 |
+
function is_addon_connected( $id_or_slug ) {
|
5960 |
+
$this->_logger->entrance();
|
5961 |
+
|
5962 |
+
$sites = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN );
|
5963 |
+
|
5964 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
5965 |
+
$addon = $this->get_addon( $addon_id );
|
5966 |
+
$slug = $addon->slug;
|
5967 |
+
if ( ! isset( $sites[ $slug ] ) ) {
|
5968 |
+
return false;
|
5969 |
+
}
|
5970 |
+
|
5971 |
+
$site = $sites[ $slug ];
|
5972 |
+
|
5973 |
+
$plugin = FS_Plugin_Manager::instance( $addon_id )->get();
|
5974 |
+
|
5975 |
+
if ( $plugin->parent_plugin_id != $this->_plugin->id ) {
|
5976 |
+
// The given slug do NOT belong to any of the plugin's add-ons.
|
5977 |
+
return false;
|
5978 |
+
}
|
5979 |
+
|
5980 |
+
return ( is_object( $site ) &&
|
5981 |
+
is_numeric( $site->id ) &&
|
5982 |
+
is_numeric( $site->user_id ) &&
|
5983 |
+
FS_Plugin_Plan::is_valid_id( $site->plan_id )
|
5984 |
+
);
|
5985 |
+
}
|
5986 |
+
|
5987 |
+
/**
|
5988 |
+
* Determines if add-on installed.
|
5989 |
+
*
|
5990 |
+
* NOTE: This is a heuristic and only works if the folder/file named as the slug.
|
5991 |
+
*
|
5992 |
+
* @author Vova Feldman (@svovaf)
|
5993 |
+
* @since 1.0.6
|
5994 |
+
*
|
5995 |
+
* @param string|number $id_or_slug
|
5996 |
+
*
|
5997 |
+
* @return bool
|
5998 |
+
*/
|
5999 |
+
function is_addon_installed( $id_or_slug ) {
|
6000 |
+
$this->_logger->entrance();
|
6001 |
+
|
6002 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
6003 |
+
|
6004 |
+
return file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->get_addon_basename( $addon_id ) ) );
|
6005 |
+
}
|
6006 |
+
|
6007 |
+
/**
|
6008 |
+
* Get add-on basename.
|
6009 |
+
*
|
6010 |
+
* @author Vova Feldman (@svovaf)
|
6011 |
+
* @since 1.0.6
|
6012 |
+
*
|
6013 |
+
* @param string|number $id_or_slug
|
6014 |
+
*
|
6015 |
+
* @return string
|
6016 |
+
*/
|
6017 |
+
function get_addon_basename( $id_or_slug ) {
|
6018 |
+
$addon_id = self::get_module_id( $id_or_slug );
|
6019 |
+
|
6020 |
+
if ( $this->is_addon_activated( $addon_id ) ) {
|
6021 |
+
return self::instance( $addon_id )->get_plugin_basename();
|
6022 |
+
}
|
6023 |
+
|
6024 |
+
$addon = $this->get_addon( $addon_id );
|
6025 |
+
$premium_basename = "{$addon->premium_slug}/{$addon->slug}.php";
|
6026 |
+
|
6027 |
+
if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $premium_basename ) ) ) {
|
6028 |
+
return $premium_basename;
|
6029 |
+
}
|
6030 |
+
|
6031 |
+
$all_plugins = $this->get_all_plugins();
|
6032 |
+
|
6033 |
+
foreach ( $all_plugins as $basename => $data ) {
|
6034 |
+
if ( $addon->slug === $data['slug'] ||
|
6035 |
+
$addon->premium_slug === $data['slug']
|
6036 |
+
) {
|
6037 |
+
return $basename;
|
6038 |
+
}
|
6039 |
+
}
|
6040 |
+
|
6041 |
+
$free_basename = "{$addon->slug}/{$addon->slug}.php";
|
6042 |
+
|
6043 |
+
return $free_basename;
|
6044 |
+
}
|
6045 |
+
|
6046 |
+
/**
|
6047 |
+
* Get installed add-ons instances.
|
6048 |
+
*
|
6049 |
+
* @author Vova Feldman (@svovaf)
|
6050 |
+
* @since 1.0.6
|
6051 |
+
*
|
6052 |
+
* @return Freemius[]
|
6053 |
+
*/
|
6054 |
+
function get_installed_addons() {
|
6055 |
+
if ( $this->is_addon() ) {
|
6056 |
+
// Add-on cannot have add-ons.
|
6057 |
+
return array();
|
6058 |
+
}
|
6059 |
+
|
6060 |
+
$installed_addons = array();
|
6061 |
+
|
6062 |
+
foreach ( self::$_instances as $instance ) {
|
6063 |
+
if ( $instance->is_addon_of( $this->_plugin->id ) ) {
|
6064 |
+
$installed_addons[] = $instance;
|
6065 |
+
}
|
6066 |
+
}
|
6067 |
+
|
6068 |
+
return $installed_addons;
|
6069 |
+
}
|
6070 |
+
|
6071 |
+
/**
|
6072 |
+
* Check if any add-ons of the plugin are installed.
|
6073 |
+
*
|
6074 |
+
* @author Leo Fajardo (@leorw)
|
6075 |
+
* @since 1.1.1
|
6076 |
+
*
|
6077 |
+
* @return bool
|
6078 |
+
*/
|
6079 |
+
function has_installed_addons() {
|
6080 |
+
if ( ! $this->has_addons() ) {
|
6081 |
+
return false;
|
6082 |
+
}
|
6083 |
+
|
6084 |
+
foreach ( self::$_instances as $instance ) {
|
6085 |
+
if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
|
6086 |
+
if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
|
6087 |
+
return true;
|
6088 |
+
}
|
6089 |
+
}
|
6090 |
+
}
|
6091 |
+
|
6092 |
+
return false;
|
6093 |
+
}
|
6094 |
+
|
6095 |
+
/**
|
6096 |
+
* Tell Freemius that the current plugin is an add-on.
|
6097 |
+
*
|
6098 |
+
* @author Vova Feldman (@svovaf)
|
6099 |
+
* @since 1.0.6
|
6100 |
+
*
|
6101 |
+
* @param number $parent_plugin_id The parent plugin ID
|
6102 |
+
*/
|
6103 |
+
function init_addon( $parent_plugin_id ) {
|
6104 |
+
$this->_plugin->parent_plugin_id = $parent_plugin_id;
|
6105 |
+
}
|
6106 |
+
|
6107 |
+
/**
|
6108 |
+
* @author Vova Feldman (@svovaf)
|
6109 |
+
* @since 1.0.6
|
6110 |
+
*
|
6111 |
+
* @return bool
|
6112 |
+
*/
|
6113 |
+
function is_addon() {
|
6114 |
+
return (
|
6115 |
+
isset( $this->_plugin->parent_plugin_id ) &&
|
6116 |
+
is_numeric( $this->_plugin->parent_plugin_id )
|
6117 |
+
);
|
6118 |
+
}
|
6119 |
+
|
6120 |
+
/**
|
6121 |
+
* @author Vova Feldman (@svovaf)
|
6122 |
+
* @since 2.3.2
|
6123 |
+
*
|
6124 |
+
* @param number $parent_product_id
|
6125 |
+
*
|
6126 |
+
* @return bool
|
6127 |
+
*/
|
6128 |
+
function is_addon_of( $parent_product_id ) {
|
6129 |
+
return (
|
6130 |
+
$this->is_addon() &&
|
6131 |
+
$parent_product_id == $this->_plugin->parent_plugin_id
|
6132 |
+
);
|
6133 |
+
}
|
6134 |
+
|
6135 |
+
/**
|
6136 |
+
* Deactivate add-on if it's premium only and the user does't have a valid license.
|
6137 |
+
*
|
6138 |
+
* @param bool $is_after_trial_cancel
|
6139 |
+
*
|
6140 |
+
* @return bool If add-on was deactivated.
|
6141 |
+
*/
|
6142 |
+
private function deactivate_premium_only_addon_without_license( $is_after_trial_cancel = false ) {
|
6143 |
+
if ( ! $this->has_free_plan() &&
|
6144 |
+
! $this->has_features_enabled_license() &&
|
6145 |
+
! $this->_has_premium_license()
|
6146 |
+
) {
|
6147 |
+
if ( $this->is_registered() ) {
|
6148 |
+
// IF wrapper is turned off because activation_timestamp is currently only stored for plugins (not addons).
|
6149 |
+
// if (empty($this->_storage->activation_timestamp) ||
|
6150 |
+
// (WP_FS__SCRIPT_START_TIME - $this->_storage->activation_timestamp) > 30
|
6151 |
+
// ) {
|
6152 |
+
/**
|
6153 |
+
* @todo When it's first fail, there's no reason to try and re-sync because the licenses were just synced after initial activation.
|
6154 |
+
*
|
6155 |
+
* Retry syncing the user add-on licenses.
|
6156 |
+
*/
|
6157 |
+
// Sync licenses.
|
6158 |
+
$this->_sync_licenses();
|
6159 |
+
// }
|
6160 |
+
|
6161 |
+
// Try to activate premium license.
|
6162 |
+
$this->_activate_license( true );
|
6163 |
+
}
|
6164 |
+
|
6165 |
+
if ( ! $this->has_free_plan() &&
|
6166 |
+
! $this->has_features_enabled_license() &&
|
6167 |
+
! $this->_has_premium_license()
|
6168 |
+
) {
|
6169 |
+
// @todo Check if deactivate plugins also call the deactivation hook.
|
6170 |
+
|
6171 |
+
$this->_parent->_admin_notices->add_sticky(
|
6172 |
+
sprintf(
|
6173 |
+
( $is_after_trial_cancel ?
|
6174 |
+
$this->_parent->get_text_inline(
|
6175 |
+
'%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you\'ll have to purchase a license.',
|
6176 |
+
'addon-trial-cancelled-message'
|
6177 |
+
) :
|
6178 |
+
$this->_parent->get_text_inline(
|
6179 |
+
'%s is a premium only add-on. You have to purchase a license first before activating the plugin.',
|
6180 |
+
'addon-no-license-message'
|
6181 |
+
)
|
6182 |
+
),
|
6183 |
+
'<b>' . $this->_plugin->title . '</b>'
|
6184 |
+
) . ' ' . sprintf(
|
6185 |
+
'<a href="%s" aria-label="%s" class="button button-primary" style="margin-left: 10px; vertical-align: middle;">%s ➜</a>',
|
6186 |
+
$this->_parent->addon_url( $this->_slug ),
|
6187 |
+
esc_attr( sprintf( $this->_parent->get_text_inline( 'More information about %s', 'more-information-about-x' ), $this->_plugin->title ) ),
|
6188 |
+
$this->_parent->get_text_inline( 'Purchase License', 'purchase-license' )
|
6189 |
+
),
|
6190 |
+
'no_addon_license_' . $this->_slug,
|
6191 |
+
( $is_after_trial_cancel ? '' : $this->_parent->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...' ),
|
6192 |
+
( $is_after_trial_cancel ? 'success' : 'error' )
|
6193 |
+
);
|
6194 |
+
|
6195 |
+
deactivate_plugins( array( $this->_plugin_basename ), true );
|
6196 |
+
|
6197 |
+
return true;
|
6198 |
+
}
|
6199 |
+
}
|
6200 |
+
|
6201 |
+
return false;
|
6202 |
+
}
|
6203 |
+
|
6204 |
+
#endregion
|
6205 |
+
|
6206 |
+
#----------------------------------------------------------------------------------
|
6207 |
+
#region Sandbox
|
6208 |
+
#----------------------------------------------------------------------------------
|
6209 |
+
|
6210 |
+
/**
|
6211 |
+
* Set Freemius into sandbox mode for debugging.
|
6212 |
+
*
|
6213 |
+
* @author Vova Feldman (@svovaf)
|
6214 |
+
* @since 1.0.4
|
6215 |
+
*
|
6216 |
+
* @param string $secret_key
|
6217 |
+
*/
|
6218 |
+
function init_sandbox( $secret_key ) {
|
6219 |
+
$this->_plugin->secret_key = $secret_key;
|
6220 |
+
|
6221 |
+
// Update plugin details.
|
6222 |
+
FS_Plugin_Manager::instance( $this->_module_id )->update( $this->_plugin, true );
|
6223 |
+
}
|
6224 |
+
|
6225 |
+
/**
|
6226 |
+
* Check if running payments in sandbox mode.
|
6227 |
+
*
|
6228 |
+
* @author Vova Feldman (@svovaf)
|
6229 |
+
* @since 1.0.4
|
6230 |
+
*
|
6231 |
+
* @return bool
|
6232 |
+
*/
|
6233 |
+
function is_payments_sandbox() {
|
6234 |
+
return ( ! $this->is_live() ) || isset( $this->_plugin->secret_key );
|
6235 |
+
}
|
6236 |
+
|
6237 |
+
#endregion
|
6238 |
+
|
6239 |
+
/**
|
6240 |
+
* Check if running test vs. live plugin.
|
6241 |
+
*
|
6242 |
+
* @author Vova Feldman (@svovaf)
|
6243 |
+
* @since 1.0.5
|
6244 |
+
*
|
6245 |
+
* @return bool
|
6246 |
+
*/
|
6247 |
+
function is_live() {
|
6248 |
+
return $this->_plugin->is_live;
|
6249 |
+
}
|
6250 |
+
|
6251 |
+
/**
|
6252 |
+
* Check if super-admin skipped connection for all sites in the network.
|
6253 |
+
*
|
6254 |
+
* @author Vova Feldman (@svovaf)
|
6255 |
+
* @since 2.0.0
|
6256 |
+
*/
|
6257 |
+
function is_network_anonymous() {
|
6258 |
+
if ( ! $this->_is_network_active ) {
|
6259 |
+
return false;
|
6260 |
+
}
|
6261 |
+
|
6262 |
+
$is_anonymous_ms = $this->_storage->get( 'is_anonymous_ms' );
|
6263 |
+
|
6264 |
+
if ( empty( $is_anonymous_ms ) ) {
|
6265 |
+
return false;
|
6266 |
+
}
|
6267 |
+
|
6268 |
+
return $is_anonymous_ms['is'];
|
6269 |
+
}
|
6270 |
+
|
6271 |
+
/**
|
6272 |
+
* Check if super-admin opted-in for all sites in the network.
|
6273 |
+
*
|
6274 |
+
* @author Vova Feldman (@svovaf)
|
6275 |
+
* @since 2.0.0
|
6276 |
+
*/
|
6277 |
+
function is_network_connected() {
|
6278 |
+
if ( ! $this->_is_network_active ) {
|
6279 |
+
return false;
|
6280 |
+
}
|
6281 |
+
|
6282 |
+
return $this->_storage->get( 'is_network_connected' );
|
6283 |
+
}
|
6284 |
+
|
6285 |
+
/**
|
6286 |
+
* Check if the user skipped connecting the account with Freemius.
|
6287 |
+
*
|
6288 |
+
* @author Vova Feldman (@svovaf)
|
6289 |
+
* @since 1.0.7
|
6290 |
+
*
|
6291 |
+
* @return bool
|
6292 |
+
*/
|
6293 |
+
function is_anonymous() {
|
6294 |
+
if ( ! isset( $this->_is_anonymous ) ) {
|
6295 |
+
if ( $this->is_network_anonymous() ) {
|
6296 |
+
$this->_is_anonymous = true;
|
6297 |
+
} else if ( ! fs_is_network_admin() ) {
|
6298 |
+
if ( ! isset( $this->_storage->is_anonymous ) ) {
|
6299 |
+
// Not skipped.
|
6300 |
+
$this->_is_anonymous = false;
|
6301 |
+
} else if ( is_bool( $this->_storage->is_anonymous ) ) {
|
6302 |
+
// For back compatibility, since the variable was boolean before.
|
6303 |
+
$this->_is_anonymous = $this->_storage->is_anonymous;
|
6304 |
+
|
6305 |
+
// Upgrade stored data format to 1.1.3 format.
|
6306 |
+
$this->set_anonymous_mode( $this->_storage->is_anonymous );
|
6307 |
+
} else {
|
6308 |
+
// Version 1.1.3 and later.
|
6309 |
+
$this->_is_anonymous = $this->_storage->is_anonymous['is'];
|
6310 |
+
}
|
6311 |
+
}
|
6312 |
+
}
|
6313 |
+
|
6314 |
+
return $this->_is_anonymous;
|
6315 |
+
}
|
6316 |
+
|
6317 |
+
/**
|
6318 |
+
* Check if the user skipped the connection of a specified site.
|
6319 |
+
*
|
6320 |
+
* @author Vova Feldman (@svovaf)
|
6321 |
+
* @since 2.0.0
|
6322 |
+
*
|
6323 |
+
* @param int $blog_id
|
6324 |
+
*
|
6325 |
+
* @return bool
|
6326 |
+
*/
|
6327 |
+
function is_anonymous_site( $blog_id = 0 ) {
|
6328 |
+
if ( $this->is_network_anonymous() ) {
|
6329 |
+
return true;
|
6330 |
+
}
|
6331 |
+
|
6332 |
+
$is_anonymous = $this->_storage->get( 'is_anonymous', false, $blog_id );
|
6333 |
+
|
6334 |
+
if ( empty( $is_anonymous ) ) {
|
6335 |
+
return false;
|
6336 |
+
}
|
6337 |
+
|
6338 |
+
return $is_anonymous['is'];
|
6339 |
+
}
|
6340 |
+
|
6341 |
+
/**
|
6342 |
+
* Check if user connected his account and install pending email activation.
|
6343 |
+
*
|
6344 |
+
* @author Vova Feldman (@svovaf)
|
6345 |
+
* @since 1.0.7
|
6346 |
+
*
|
6347 |
+
* @return bool
|
6348 |
+
*/
|
6349 |
+
function is_pending_activation() {
|
6350 |
+
return $this->_storage->get( 'is_pending_activation', false );
|
6351 |
+
}
|
6352 |
+
|
6353 |
+
/**
|
6354 |
+
* Check if plugin must be WordPress.org compliant.
|
6355 |
+
*
|
6356 |
+
* @since 1.0.7
|
6357 |
+
*
|
6358 |
+
* @return bool
|
6359 |
+
*/
|
6360 |
+
function is_org_repo_compliant() {
|
6361 |
+
return $this->_is_org_compliant;
|
6362 |
+
}
|
6363 |
+
|
6364 |
+
#--------------------------------------------------------------------------------
|
6365 |
+
#region WP Cron Common
|
6366 |
+
#--------------------------------------------------------------------------------
|
6367 |
+
|
6368 |
+
/**
|
6369 |
+
* @author Vova Feldman (@svovaf)
|
6370 |
+
* @since 2.0.0
|
6371 |
+
*
|
6372 |
+
* @param string $name Cron name.
|
6373 |
+
*
|
6374 |
+
* @return object
|
6375 |
+
*/
|
6376 |
+
private function get_cron_data( $name ) {
|
6377 |
+
$this->_logger->entrance( $name );
|
6378 |
+
|
6379 |
+
/**
|
6380 |
+
* @var object $cron_data
|
6381 |
+
*/
|
6382 |
+
return $this->_storage->get( "{$name}_cron", null );
|
6383 |
+
}
|
6384 |
+
|
6385 |
+
/**
|
6386 |
+
* @author Vova Feldman (@svovaf)
|
6387 |
+
* @since 2.0.0
|
6388 |
+
*
|
6389 |
+
* @param string $name Cron name.
|
6390 |
+
*/
|
6391 |
+
private function clear_cron_data( $name ) {
|
6392 |
+
$this->_logger->entrance( $name );
|
6393 |
+
|
6394 |
+
$this->_storage->remove( "{$name}_cron" );
|
6395 |
+
}
|
6396 |
+
|
6397 |
+
/**
|
6398 |
+
* @author Vova Feldman (@svovaf)
|
6399 |
+
* @since 2.0.0
|
6400 |
+
*
|
6401 |
+
* @param string $name Cron name.
|
6402 |
+
* @param int $cron_blog_id The cron executing blog ID.
|
6403 |
+
*/
|
6404 |
+
private function set_cron_data( $name, $cron_blog_id = 0 ) {
|
6405 |
+
$this->_logger->entrance( $name );
|
6406 |
+
|
6407 |
+
$this->_storage->store( "{$name}_cron", (object) array(
|
6408 |
+
'version' => $this->get_plugin_version(),
|
6409 |
+
'blog_id' => $cron_blog_id,
|
6410 |
+
'sdk_version' => $this->version,
|
6411 |
+
'timestamp' => WP_FS__SCRIPT_START_TIME,
|
6412 |
+
'on' => true,
|
6413 |
+
) );
|
6414 |
+
}
|
6415 |
+
|
6416 |
+
/**
|
6417 |
+
* Get the cron's executing blog ID.
|
6418 |
+
*
|
6419 |
+
* @author Vova Feldman (@svovaf)
|
6420 |
+
* @since 2.0.0
|
6421 |
+
*
|
6422 |
+
* @param string $name Cron name.
|
6423 |
+
*
|
6424 |
+
* @return int
|
6425 |
+
*/
|
6426 |
+
private function get_cron_blog_id( $name ) {
|
6427 |
+
$this->_logger->entrance( $name );
|
6428 |
+
|
6429 |
+
/**
|
6430 |
+
* @var object $cron_data
|
6431 |
+
*/
|
6432 |
+
$cron_data = $this->get_cron_data( $name );
|
6433 |
+
|
6434 |
+
return ( is_object( $cron_data ) && is_numeric( $cron_data->blog_id ) ) ?
|
6435 |
+
$cron_data->blog_id :
|
6436 |
+
0;
|
6437 |
+
}
|
6438 |
+
|
6439 |
+
/**
|
6440 |
+
* @author Vova Feldman (@svovaf)
|
6441 |
+
* @since 2.0.0
|
6442 |
+
*
|
6443 |
+
* @param string $name Cron name.
|
6444 |
+
*
|
6445 |
+
* @return bool
|
6446 |
+
*/
|
6447 |
+
private function is_cron_on( $name ) {
|
6448 |
+
$this->_logger->entrance( $name );
|
6449 |
+
|
6450 |
+
/**
|
6451 |
+
* @var object $cron_data
|
6452 |
+
*/
|
6453 |
+
$cron_data = $this->get_cron_data( $name );
|
6454 |
+
|
6455 |
+
return ( ! is_null( $cron_data ) && true === $cron_data->on );
|
6456 |
+
}
|
6457 |
+
|
6458 |
+
/**
|
6459 |
+
* Unix timestamp for previous cron execution or false if never executed.
|
6460 |
+
*
|
6461 |
+
* @author Vova Feldman (@svovaf)
|
6462 |
+
* @since 2.0.0
|
6463 |
+
*
|
6464 |
+
* @param string $name Cron name.
|
6465 |
+
*
|
6466 |
+
* @return int|false
|
6467 |
+
*/
|
6468 |
+
private function cron_last_execution( $name ) {
|
6469 |
+
$this->_logger->entrance( $name );
|
6470 |
+
|
6471 |
+
return $this->_storage->get( "{$name}_timestamp" );
|
6472 |
+
}
|
6473 |
+
|
6474 |
+
/**
|
6475 |
+
* Set cron execution time to now.
|
6476 |
+
*
|
6477 |
+
* @author Vova Feldman (@svovaf)
|
6478 |
+
* @since 2.0.0
|
6479 |
+
*
|
6480 |
+
* @param string $name Cron name.
|
6481 |
+
*/
|
6482 |
+
private function set_cron_execution_timestamp( $name ) {
|
6483 |
+
$this->_logger->entrance( $name );
|
6484 |
+
|
6485 |
+
$this->_storage->store( "{$name}_timestamp", time() );
|
6486 |
+
}
|
6487 |
+
|
6488 |
+
/**
|
6489 |
+
* Sets the keepalive time to now.
|
6490 |
+
*
|
6491 |
+
* @author Leo Fajardo (@leorw)
|
6492 |
+
* @since 2.2.3
|
6493 |
+
*
|
6494 |
+
* @param bool|null $use_network_level_storage
|
6495 |
+
*/
|
6496 |
+
private function set_keepalive_timestamp( $use_network_level_storage = null ) {
|
6497 |
+
$this->_logger->entrance();
|
6498 |
+
|
6499 |
+
$this->_storage->store( 'keepalive_timestamp', time(), $use_network_level_storage );
|
6500 |
+
}
|
6501 |
+
|
6502 |
+
/**
|
6503 |
+
* Check if cron was executed in the last $period of seconds.
|
6504 |
+
*
|
6505 |
+
* @author Vova Feldman (@svovaf)
|
6506 |
+
* @since 2.0.0
|
6507 |
+
*
|
6508 |
+
* @param string $name Cron name.
|
6509 |
+
* @param int $period In seconds
|
6510 |
+
*
|
6511 |
+
* @return bool
|
6512 |
+
*/
|
6513 |
+
private function is_cron_executed( $name, $period = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
6514 |
+
$this->_logger->entrance( $name );
|
6515 |
+
|
6516 |
+
$last_execution = $this->cron_last_execution( $name );
|
6517 |
+
|
6518 |
+
if ( ! is_numeric( $last_execution ) ) {
|
6519 |
+
return false;
|
6520 |
+
}
|
6521 |
+
|
6522 |
+
return ( $last_execution > ( WP_FS__SCRIPT_START_TIME - $period ) );
|
6523 |
+
}
|
6524 |
+
|
6525 |
+
/**
|
6526 |
+
* WP Cron is executed on a site level. When running in a multisite network environment
|
6527 |
+
* with the network integration activated, for optimization reasons, we are consolidating
|
6528 |
+
* the installs data sync cron to be executed only from a single site.
|
6529 |
+
*
|
6530 |
+
* @author Vova Feldman (@svovaf)
|
6531 |
+
* @since 2.0.0
|
6532 |
+
*
|
6533 |
+
* @param int $except_blog_id Target any except the excluded blog ID.
|
6534 |
+
*
|
6535 |
+
* @return int
|
6536 |
+
*/
|
6537 |
+
private function get_cron_target_blog_id( $except_blog_id = 0 ) {
|
6538 |
+
if ( ! is_multisite() ) {
|
6539 |
+
return 0;
|
6540 |
+
}
|
6541 |
+
|
6542 |
+
if ( $this->_is_network_active &&
|
6543 |
+
is_numeric( $this->_storage->network_install_blog_id ) &&
|
6544 |
+
$except_blog_id != $this->_storage->network_install_blog_id &&
|
6545 |
+
self::is_site_active( $this->_storage->network_install_blog_id )
|
6546 |
+
) {
|
6547 |
+
// Try to run cron from the main network blog.
|
6548 |
+
$install = $this->get_install_by_blog_id( $this->_storage->network_install_blog_id );
|
6549 |
+
|
6550 |
+
if ( is_object( $install ) &&
|
6551 |
+
( $this->is_premium() || $install->is_tracking_allowed() )
|
6552 |
+
) {
|
6553 |
+
return $this->_storage->network_install_blog_id;
|
6554 |
+
}
|
6555 |
+
}
|
6556 |
+
|
6557 |
+
// Get first opted-in blog ID with active tracking.
|
6558 |
+
$installs = $this->get_blog_install_map();
|
6559 |
+
foreach ( $installs as $blog_id => $install ) {
|
6560 |
+
if ( $except_blog_id != $blog_id &&
|
6561 |
+
self::is_site_active( $blog_id ) &&
|
6562 |
+
( $this->is_premium() || $install->is_tracking_allowed() )
|
6563 |
+
) {
|
6564 |
+
return $blog_id;
|
6565 |
+
}
|
6566 |
+
}
|
6567 |
+
|
6568 |
+
return 0;
|
6569 |
+
}
|
6570 |
+
|
6571 |
+
/**
|
6572 |
+
* @author Vova Feldman (@svovaf)
|
6573 |
+
* @since 2.0.0
|
6574 |
+
*
|
6575 |
+
* @param string $name Cron name.
|
6576 |
+
* @param string $action_tag Callback action tag.
|
6577 |
+
* @param bool $is_network_clear If set to TRUE, clear sync cron even if there are installs that are still connected.
|
6578 |
+
*/
|
6579 |
+
private function clear_cron( $name, $action_tag = '', $is_network_clear = false ) {
|
6580 |
+
$this->_logger->entrance( $name );
|
6581 |
+
|
6582 |
+
if ( ! $this->is_cron_on( $name ) ) {
|
6583 |
+
return;
|
6584 |
+
}
|
6585 |
+
|
6586 |
+
$clear_cron = true;
|
6587 |
+
if ( ! $is_network_clear && $this->_is_network_active ) {
|
6588 |
+
$installs = $this->get_blog_install_map();
|
6589 |
+
|
6590 |
+
foreach ( $installs as $blog_id => $install ) {
|
6591 |
+
/**
|
6592 |
+
* @var FS_Site $install
|
6593 |
+
*/
|
6594 |
+
if ( $install->is_tracking_allowed() ) {
|
6595 |
+
$clear_cron = false;
|
6596 |
+
break;
|
6597 |
+
}
|
6598 |
+
}
|
6599 |
+
}
|
6600 |
+
|
6601 |
+
if ( ! $clear_cron ) {
|
6602 |
+
return;
|
6603 |
+
}
|
6604 |
+
|
6605 |
+
/**
|
6606 |
+
* @var object $cron_data
|
6607 |
+
*/
|
6608 |
+
$cron_data = $this->get_cron_data( $name );
|
6609 |
+
|
6610 |
+
$cron_blog_id = is_object( $cron_data ) && isset( $cron_data->blog_id ) ?
|
6611 |
+
$cron_data->blog_id :
|
6612 |
+
0;
|
6613 |
+
|
6614 |
+
$this->clear_cron_data( $name );
|
6615 |
+
|
6616 |
+
if ( 0 < $cron_blog_id ) {
|
6617 |
+
switch_to_blog( $cron_blog_id );
|
6618 |
+
}
|
6619 |
+
|
6620 |
+
if ( empty( $action_tag ) ) {
|
6621 |
+
$action_tag = $name;
|
6622 |
+
}
|
6623 |
+
|
6624 |
+
wp_clear_scheduled_hook( $this->get_action_tag( $action_tag ) );
|
6625 |
+
|
6626 |
+
if ( 0 < $cron_blog_id ) {
|
6627 |
+
restore_current_blog();
|
6628 |
+
}
|
6629 |
+
}
|
6630 |
+
|
6631 |
+
/**
|
6632 |
+
* Unix timestamp for next cron execution or false if not scheduled.
|
6633 |
+
*
|
6634 |
+
* @author Vova Feldman (@svovaf)
|
6635 |
+
* @since 2.0.0
|
6636 |
+
*
|
6637 |
+
* @param string $name Cron name.
|
6638 |
+
* @param string $action_tag Callback action tag.
|
6639 |
+
*
|
6640 |
+
* @return int|false
|
6641 |
+
*/
|
6642 |
+
private function get_next_scheduled_cron( $name, $action_tag = '' ) {
|
6643 |
+
$this->_logger->entrance( $name );
|
6644 |
+
|
6645 |
+
if ( ! $this->is_cron_on( $name ) ) {
|
6646 |
+
return false;
|
6647 |
+
}
|
6648 |
+
|
6649 |
+
/**
|
6650 |
+
* @var object $cron_data
|
6651 |
+
*/
|
6652 |
+
$cron_data = $this->get_cron_data( $name );
|
6653 |
+
|
6654 |
+
$cron_blog_id = is_object( $cron_data ) && isset( $cron_data->blog_id ) ?
|
6655 |
+
$cron_data->blog_id :
|
6656 |
+
0;
|
6657 |
+
|
6658 |
+
if ( 0 < $cron_blog_id ) {
|
6659 |
+
switch_to_blog( $cron_blog_id );
|
6660 |
+
}
|
6661 |
+
|
6662 |
+
if ( empty( $action_tag ) ) {
|
6663 |
+
$action_tag = $name;
|
6664 |
+
}
|
6665 |
+
|
6666 |
+
$next_scheduled = wp_next_scheduled( $this->get_action_tag( $action_tag ) );
|
6667 |
+
|
6668 |
+
if ( 0 < $cron_blog_id ) {
|
6669 |
+
restore_current_blog();
|
6670 |
+
}
|
6671 |
+
|
6672 |
+
return $next_scheduled;
|
6673 |
+
}
|
6674 |
+
|
6675 |
+
/**
|
6676 |
+
* @author Vova Feldman (@svovaf)
|
6677 |
+
* @since 2.0.0
|
6678 |
+
*
|
6679 |
+
* @param string $name Cron name.
|
6680 |
+
* @param string $action_tag Callback action tag.
|
6681 |
+
* @param string $recurrence 'single' or 'daily'.
|
6682 |
+
* @param int $start_at Defaults to now.
|
6683 |
+
* @param bool $randomize_start If true, schedule first job randomly during the next 12 hours. Otherwise, schedule job to start right away.
|
6684 |
+
* @param int $except_blog_id Target any except the excluded blog ID.
|
6685 |
+
*/
|
6686 |
+
private function schedule_cron(
|
6687 |
+
$name,
|
6688 |
+
$action_tag = '',
|
6689 |
+
$recurrence = 'single',
|
6690 |
+
$start_at = WP_FS__SCRIPT_START_TIME,
|
6691 |
+
$randomize_start = true,
|
6692 |
+
$except_blog_id = 0
|
6693 |
+
) {
|
6694 |
+
$this->_logger->entrance( $name );
|
6695 |
+
|
6696 |
+
$this->clear_cron( $name, $action_tag, true );
|
6697 |
+
|
6698 |
+
$cron_blog_id = $this->get_cron_target_blog_id( $except_blog_id );
|
6699 |
+
|
6700 |
+
if ( is_multisite() && 0 == $cron_blog_id ) {
|
6701 |
+
// Don't schedule cron since couldn't find a target blog.
|
6702 |
+
return;
|
6703 |
+
}
|
6704 |
+
|
6705 |
+
if ( 0 < $cron_blog_id ) {
|
6706 |
+
switch_to_blog( $cron_blog_id );
|
6707 |
+
}
|
6708 |
+
|
6709 |
+
if ( 'daily' === $recurrence ) {
|
6710 |
+
if ( $randomize_start ) {
|
6711 |
+
// Schedule first sync with a random 12 hour time range from now.
|
6712 |
+
$start_at += rand( 0, ( WP_FS__TIME_24_HOURS_IN_SEC / 2 ) );
|
6713 |
+
}
|
6714 |
+
|
6715 |
+
// Schedule daily WP cron.
|
6716 |
+
wp_schedule_event(
|
6717 |
+
$start_at,
|
6718 |
+
'daily',
|
6719 |
+
$this->get_action_tag( $action_tag )
|
6720 |
+
);
|
6721 |
+
} else if ( 'single' === $recurrence ) {
|
6722 |
+
// Schedule single cron.
|
6723 |
+
wp_schedule_single_event(
|
6724 |
+
$start_at,
|
6725 |
+
$this->get_action_tag( $action_tag )
|
6726 |
+
);
|
6727 |
+
}
|
6728 |
+
|
6729 |
+
$this->set_cron_data( $name, $cron_blog_id );
|
6730 |
+
|
6731 |
+
if ( 0 < $cron_blog_id ) {
|
6732 |
+
restore_current_blog();
|
6733 |
+
}
|
6734 |
+
}
|
6735 |
+
|
6736 |
+
/**
|
6737 |
+
* Consolidated cron execution for performance optimization. The max number of API requests is based on the number of unique opted-in users.
|
6738 |
+
* that doesn't halt page loading.
|
6739 |
+
*
|
6740 |
+
* @author Vova Feldman (@svovaf)
|
6741 |
+
* @since 2.0.0
|
6742 |
+
*
|
6743 |
+
* @param string $name Cron name.
|
6744 |
+
* @param callable $callable The function that should be executed.
|
6745 |
+
*/
|
6746 |
+
private function execute_cron( $name, $callable ) {
|
6747 |
+
$this->_logger->entrance( $name );
|
6748 |
+
|
6749 |
+
// Store the last time data sync was executed.
|
6750 |
+
$this->set_cron_execution_timestamp( $name );
|
6751 |
+
|
6752 |
+
// Check if API is temporary down.
|
6753 |
+
if ( FS_Api::is_temporary_down() ) {
|
6754 |
+
return;
|
6755 |
+
}
|
6756 |
+
|
6757 |
+
// @todo Add logic that identifies API latency, and reschedule the next background sync randomly between 8-16 hours.
|
6758 |
+
|
6759 |
+
$users_2_blog_ids = array();
|
6760 |
+
|
6761 |
+
if ( ! is_multisite() ) {
|
6762 |
+
// Add dummy blog.
|
6763 |
+
$users_2_blog_ids[0] = array( 0 );
|
6764 |
+
} else {
|
6765 |
+
$installs = $this->get_blog_install_map();
|
6766 |
+
foreach ( $installs as $blog_id => $install ) {
|
6767 |
+
if ( $this->is_premium() || $install->is_tracking_allowed() ) {
|
6768 |
+
if ( ! isset( $users_2_blog_ids[ $install->user_id ] ) ) {
|
6769 |
+
$users_2_blog_ids[ $install->user_id ] = array();
|
6770 |
+
}
|
6771 |
+
|
6772 |
+
$users_2_blog_ids[ $install->user_id ][] = $blog_id;
|
6773 |
+
}
|
6774 |
+
}
|
6775 |
+
}
|
6776 |
+
|
6777 |
+
$current_blog_id = get_current_blog_id();
|
6778 |
+
|
6779 |
+
foreach ( $users_2_blog_ids as $user_id => $blog_ids ) {
|
6780 |
+
if ( 0 < $blog_ids[0] ) {
|
6781 |
+
$this->switch_to_blog( $blog_ids[0] );
|
6782 |
+
}
|
6783 |
+
|
6784 |
+
call_user_func_array( $callable, array( $blog_ids, ( is_multisite() ? $current_blog_id : null ) ) );
|
6785 |
+
|
6786 |
+
foreach ( $blog_ids as $blog_id ) {
|
6787 |
+
$this->do_action( "after_{$name}_cron", $blog_id );
|
6788 |
+
}
|
6789 |
+
}
|
6790 |
+
|
6791 |
+
if ( is_multisite() ) {
|
6792 |
+
$this->switch_to_blog( $current_blog_id, fs_is_network_admin() ? $this->get_network_install() : null );
|
6793 |
+
|
6794 |
+
$this->do_action( "after_{$name}_cron_multisite" );
|
6795 |
+
}
|
6796 |
+
}
|
6797 |
+
|
6798 |
+
#endregion
|
6799 |
+
|
6800 |
+
#----------------------------------------------------------------------------------
|
6801 |
+
#region Daily Sync Cron
|
6802 |
+
#----------------------------------------------------------------------------------
|
6803 |
+
|
6804 |
+
|
6805 |
+
/**
|
6806 |
+
* @author Vova Feldman (@svovaf)
|
6807 |
+
* @since 2.0.0
|
6808 |
+
*
|
6809 |
+
* @return bool
|
6810 |
+
*/
|
6811 |
+
private function is_sync_cron_scheduled() {
|
6812 |
+
return $this->is_cron_on( 'sync' );
|
6813 |
+
}
|
6814 |
+
|
6815 |
+
/**
|
6816 |
+
* Get the sync cron's executing blog ID.
|
6817 |
+
*
|
6818 |
+
* @author Vova Feldman (@svovaf)
|
6819 |
+
* @since 2.0.0
|
6820 |
+
*
|
6821 |
+
* @return int
|
6822 |
+
*/
|
6823 |
+
private function get_sync_cron_blog_id() {
|
6824 |
+
return $this->get_cron_blog_id( 'sync' );
|
6825 |
+
}
|
6826 |
+
|
6827 |
+
/**
|
6828 |
+
* @author Vova Feldman (@svovaf)
|
6829 |
+
* @since 1.1.7.3
|
6830 |
+
*/
|
6831 |
+
private function run_manual_sync() {
|
6832 |
+
self::require_pluggable_essentials();
|
6833 |
+
|
6834 |
+
if ( ! $this->is_user_admin() ) {
|
6835 |
+
return;
|
6836 |
+
}
|
6837 |
+
|
6838 |
+
// Run manual sync.
|
6839 |
+
$this->_sync_cron();
|
6840 |
+
|
6841 |
+
// Reschedule next cron to run 24 hours from now (performance optimization).
|
6842 |
+
$this->schedule_sync_cron( time() + WP_FS__TIME_24_HOURS_IN_SEC, false );
|
6843 |
+
}
|
6844 |
+
|
6845 |
+
/**
|
6846 |
+
* Data sync cron job. Replaces the background sync non blocking HTTP request
|
6847 |
+
* that doesn't halt page loading.
|
6848 |
+
*
|
6849 |
+
* @author Vova Feldman (@svovaf)
|
6850 |
+
* @since 1.1.7.3
|
6851 |
+
* @since 2.0.0 Consolidate all the data sync into the same cron for performance optimization. The max number of API requests is based on the number of unique opted-in users.
|
6852 |
+
*/
|
6853 |
+
function _sync_cron() {
|
6854 |
+
$this->_logger->entrance();
|
6855 |
+
|
6856 |
+
$this->execute_cron( 'sync', array( &$this, '_sync_cron_method' ) );
|
6857 |
+
}
|
6858 |
+
|
6859 |
+
/**
|
6860 |
+
* The actual data sync cron logic.
|
6861 |
+
*
|
6862 |
+
* @author Vova Feldman (@svovaf)
|
6863 |
+
* @since 2.0.0
|
6864 |
+
*
|
6865 |
+
* @param int[] $blog_ids
|
6866 |
+
* @param int|null $current_blog_id @since 2.2.3. This is passed from the `execute_cron` method and used by the
|
6867 |
+
* `_sync_plugin_license` method in order to switch to the previous blog when sending
|
6868 |
+
* updates for a single site in case `execute_cron` has switched to a different blog.
|
6869 |
+
*/
|
6870 |
+
function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
|
6871 |
+
if ( $this->is_registered() ) {
|
6872 |
+
if ( $this->has_paid_plan() ) {
|
6873 |
+
// Initiate background plan sync.
|
6874 |
+
$this->_sync_license( true, false, $current_blog_id );
|
6875 |
+
|
6876 |
+
if ( $this->is_paying() ) {
|
6877 |
+
// Check for premium plugin updates.
|
6878 |
+
$this->check_updates( true );
|
6879 |
+
}
|
6880 |
+
} else {
|
6881 |
+
// Sync install(s) (only if something changed locally).
|
6882 |
+
if ( 1 < count( $blog_ids ) ) {
|
6883 |
+
$this->sync_installs();
|
6884 |
+
} else {
|
6885 |
+
$this->sync_install();
|
6886 |
+
}
|
6887 |
+
|
6888 |
+
$this->maybe_sync_install_user();
|
6889 |
+
}
|
6890 |
+
}
|
6891 |
+
}
|
6892 |
+
|
6893 |
+
/**
|
6894 |
+
* Check if sync was executed in the last $period of seconds.
|
6895 |
+
*
|
6896 |
+
* @author Vova Feldman (@svovaf)
|
6897 |
+
* @since 1.1.7.3
|
6898 |
+
*
|
6899 |
+
* @param int $period In seconds
|
6900 |
+
*
|
6901 |
+
* @return bool
|
6902 |
+
*/
|
6903 |
+
private function is_sync_executed( $period = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
6904 |
+
return $this->is_cron_executed( 'sync', $period );
|
6905 |
+
}
|
6906 |
+
|
6907 |
+
/**
|
6908 |
+
* @author Vova Feldman (@svovaf)
|
6909 |
+
* @since 1.1.7.3
|
6910 |
+
*
|
6911 |
+
* @return bool
|
6912 |
+
*/
|
6913 |
+
private function is_sync_cron_on() {
|
6914 |
+
return $this->is_cron_on( 'sync' );
|
6915 |
+
}
|
6916 |
+
|
6917 |
+
/**
|
6918 |
+
* @author Vova Feldman (@svovaf)
|
6919 |
+
* @since 1.1.7.3
|
6920 |
+
*
|
6921 |
+
* @param int $start_at Defaults to now.
|
6922 |
+
* @param bool $randomize_start If true, schedule first job randomly during the next 12 hours. Otherwise, schedule job to start right away.
|
6923 |
+
* @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
|
6924 |
+
*/
|
6925 |
+
private function schedule_sync_cron(
|
6926 |
+
$start_at = WP_FS__SCRIPT_START_TIME,
|
6927 |
+
$randomize_start = true,
|
6928 |
+
$except_blog_id = 0
|
6929 |
+
) {
|
6930 |
+
$this->schedule_cron(
|
6931 |
+
'sync',
|
6932 |
+
'data_sync',
|
6933 |
+
'daily',
|
6934 |
+
$start_at,
|
6935 |
+
$randomize_start,
|
6936 |
+
$except_blog_id
|
6937 |
+
);
|
6938 |
+
}
|
6939 |
+
|
6940 |
+
/**
|
6941 |
+
* Add the actual sync function to the cron job hook.
|
6942 |
+
*
|
6943 |
+
* @author Vova Feldman (@svovaf)
|
6944 |
+
* @since 1.1.7.3
|
6945 |
+
*/
|
6946 |
+
private function hook_callback_to_sync_cron() {
|
6947 |
+
$this->add_action( 'data_sync', array( &$this, '_sync_cron' ) );
|
6948 |
+
}
|
6949 |
+
|
6950 |
+
/**
|
6951 |
+
* @author Vova Feldman (@svovaf)
|
6952 |
+
* @since 1.1.7.3
|
6953 |
+
*
|
6954 |
+
* @param bool $is_network_clear Since 2.0.0 If set to TRUE, clear sync cron even if there are installs that are still connected.
|
6955 |
+
*/
|
6956 |
+
private function clear_sync_cron( $is_network_clear = false ) {
|
6957 |
+
$this->_logger->entrance();
|
6958 |
+
|
6959 |
+
$this->clear_cron( 'sync', 'data_sync', $is_network_clear );
|
6960 |
+
}
|
6961 |
+
|
6962 |
+
/**
|
6963 |
+
* Unix timestamp for next sync cron execution or false if not scheduled.
|
6964 |
+
*
|
6965 |
+
* @author Vova Feldman (@svovaf)
|
6966 |
+
* @since 1.1.7.3
|
6967 |
+
*
|
6968 |
+
* @return int|false
|
6969 |
+
*/
|
6970 |
+
function next_sync_cron() {
|
6971 |
+
return $this->get_next_scheduled_cron( 'sync', 'data_sync' );
|
6972 |
+
}
|
6973 |
+
|
6974 |
+
/**
|
6975 |
+
* Unix timestamp for previous sync cron execution or false if never executed.
|
6976 |
+
*
|
6977 |
+
* @author Vova Feldman (@svovaf)
|
6978 |
+
* @since 1.1.7.3
|
6979 |
+
*
|
6980 |
+
* @return int|false
|
6981 |
+
*/
|
6982 |
+
function last_sync_cron() {
|
6983 |
+
return $this->cron_last_execution( 'sync' );
|
6984 |
+
}
|
6985 |
+
|
6986 |
+
#endregion Daily Sync Cron ------------------------------------------------------------------
|
6987 |
+
|
6988 |
+
#----------------------------------------------------------------------------------
|
6989 |
+
#region Async Install Sync
|
6990 |
+
#----------------------------------------------------------------------------------
|
6991 |
+
|
6992 |
+
/**
|
6993 |
+
* @author Vova Feldman (@svovaf)
|
6994 |
+
* @since 1.1.7.3
|
6995 |
+
*
|
6996 |
+
* @return bool
|
6997 |
+
*/
|
6998 |
+
private function is_install_sync_scheduled() {
|
6999 |
+
return $this->is_cron_on( 'install_sync' );
|
7000 |
+
}
|
7001 |
+
|
7002 |
+
/**
|
7003 |
+
* Get the sync cron's executing blog ID.
|
7004 |
+
*
|
7005 |
+
* @author Vova Feldman (@svovaf)
|
7006 |
+
* @since 2.0.0
|
7007 |
+
*
|
7008 |
+
* @return int
|
7009 |
+
*/
|
7010 |
+
private function get_install_sync_cron_blog_id() {
|
7011 |
+
return $this->get_cron_blog_id( 'install_sync' );
|
7012 |
+
}
|
7013 |
+
|
7014 |
+
/**
|
7015 |
+
* Instead of running blocking install sync event, execute non blocking scheduled wp-cron.
|
7016 |
+
*
|
7017 |
+
* @author Vova Feldman (@svovaf)
|
7018 |
+
* @since 1.1.7.3
|
7019 |
+
*
|
7020 |
+
* @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
|
7021 |
+
*/
|
7022 |
+
private function schedule_install_sync( $except_blog_id = 0 ) {
|
7023 |
+
$this->schedule_cron( 'install_sync', 'install_sync', 'single', WP_FS__SCRIPT_START_TIME, false, $except_blog_id );
|
7024 |
+
}
|
7025 |
+
|
7026 |
+
/**
|
7027 |
+
* Unix timestamp for previous install sync cron execution or false if never executed.
|
7028 |
+
*
|
7029 |
+
* @todo There's some very strange bug that $this->_storage->install_sync_timestamp value is not being updated. But for sure the sync event is working.
|
7030 |
+
*
|
7031 |
+
* @author Vova Feldman (@svovaf)
|
7032 |
+
* @since 1.1.7.3
|
7033 |
+
*
|
7034 |
+
* @return int|false
|
7035 |
+
*/
|
7036 |
+
function last_install_sync() {
|
7037 |
+
return $this->cron_last_execution( 'install_sync' );
|
7038 |
+
}
|
7039 |
+
|
7040 |
+
/**
|
7041 |
+
* Unix timestamp for next install sync cron execution or false if not scheduled.
|
7042 |
+
*
|
7043 |
+
* @author Vova Feldman (@svovaf)
|
7044 |
+
* @since 1.1.7.3
|
7045 |
+
*
|
7046 |
+
* @return int|false
|
7047 |
+
*/
|
7048 |
+
function next_install_sync() {
|
7049 |
+
return $this->get_next_scheduled_cron( 'install_sync', 'install_sync' );
|
7050 |
+
}
|
7051 |
+
|
7052 |
+
/**
|
7053 |
+
* Add the actual install sync function to the cron job hook.
|
7054 |
+
*
|
7055 |
+
* @author Vova Feldman (@svovaf)
|
7056 |
+
* @since 1.1.7.3
|
7057 |
+
*/
|
7058 |
+
private function hook_callback_to_install_sync() {
|
7059 |
+
$this->add_action( 'install_sync', array( &$this, '_run_sync_install' ) );
|
7060 |
+
}
|
7061 |
+
|
7062 |
+
/**
|
7063 |
+
* @author Vova Feldman (@svovaf)
|
7064 |
+
* @since 1.1.7.3
|
7065 |
+
*
|
7066 |
+
* @param bool $is_network_clear Since 2.0.0 If set to TRUE, clear sync cron even if there are installs that are still connected.
|
7067 |
+
*/
|
7068 |
+
private function clear_install_sync_cron( $is_network_clear = false ) {
|
7069 |
+
$this->_logger->entrance();
|
7070 |
+
|
7071 |
+
$this->clear_cron( 'install_sync', 'install_sync', $is_network_clear );
|
7072 |
+
}
|
7073 |
+
|
7074 |
+
/**
|
7075 |
+
* @author Vova Feldman (@svovaf)
|
7076 |
+
* @since 1.1.7.3
|
7077 |
+
* @since 2.0.0 Consolidate all the data sync into the same cron for performance optimization. The max number of API requests is based on the number of unique opted-in users.
|
7078 |
+
*/
|
7079 |
+
public function _run_sync_install() {
|
7080 |
+
$this->_logger->entrance();
|
7081 |
+
|
7082 |
+
$this->execute_cron( 'sync', array( &$this, '_sync_install_cron_method' ) );
|
7083 |
+
}
|
7084 |
+
|
7085 |
+
/**
|
7086 |
+
* The actual install(s) sync cron logic.
|
7087 |
+
*
|
7088 |
+
* @author Vova Feldman (@svovaf)
|
7089 |
+
* @since 2.0.0
|
7090 |
+
*
|
7091 |
+
* @param int[] $blog_ids
|
7092 |
+
* @param int|null $current_blog_id
|
7093 |
+
*/
|
7094 |
+
function _sync_install_cron_method( array $blog_ids, $current_blog_id = null ) {
|
7095 |
+
if ( $this->is_registered() ) {
|
7096 |
+
if ( 1 < count( $blog_ids ) ) {
|
7097 |
+
$this->sync_installs( array(), true );
|
7098 |
+
} else {
|
7099 |
+
$this->sync_install( array(), true );
|
7100 |
+
}
|
7101 |
+
|
7102 |
+
$this->maybe_sync_install_user();
|
7103 |
+
}
|
7104 |
+
}
|
7105 |
+
|
7106 |
+
#endregion Async Install Sync ------------------------------------------------------------------
|
7107 |
+
|
7108 |
+
/**
|
7109 |
+
* Show a notice that activation is currently pending.
|
7110 |
+
*
|
7111 |
+
* @author Vova Feldman (@svovaf)
|
7112 |
+
* @since 1.0.7
|
7113 |
+
*
|
7114 |
+
* @param bool|string $email
|
7115 |
+
* @param bool $is_pending_trial Since 1.2.1.5
|
7116 |
+
*/
|
7117 |
+
function _add_pending_activation_notice( $email = false, $is_pending_trial = false ) {
|
7118 |
+
if ( ! is_string( $email ) ) {
|
7119 |
+
$current_user = self::_get_current_wp_user();
|
7120 |
+
$email = $current_user->user_email;
|
7121 |
+
}
|
7122 |
+
|
7123 |
+
$this->_admin_notices->add_sticky(
|
7124 |
+
sprintf(
|
7125 |
+
$this->get_text_inline( 'You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s.', 'pending-activation-message' ),
|
7126 |
+
'<b>' . $this->get_plugin_name() . '</b>',
|
7127 |
+
'<b>' . $email . '</b>',
|
7128 |
+
( $is_pending_trial ?
|
7129 |
+
$this->get_text_inline( 'start the trial', 'start-the-trial' ) :
|
7130 |
+
$this->get_text_inline( 'complete the install', 'complete-the-install' ) )
|
7131 |
+
),
|
7132 |
+
'activation_pending',
|
7133 |
+
'Thanks!'
|
7134 |
+
);
|
7135 |
+
}
|
7136 |
+
|
7137 |
+
/**
|
7138 |
+
* Check if currently in plugin activation.
|
7139 |
+
*
|
7140 |
+
* @author Vova Feldman (@svovaf)
|
7141 |
+
* @since 1.1.4
|
7142 |
+
*
|
7143 |
+
* @return bool
|
7144 |
+
*/
|
7145 |
+
function is_plugin_activation() {
|
7146 |
+
$result = get_transient( "fs_{$this->_module_type}_{$this->_slug}_activated" );
|
7147 |
+
|
7148 |
+
return !empty($result);
|
7149 |
+
}
|
7150 |
+
|
7151 |
+
/**
|
7152 |
+
*
|
7153 |
+
* NOTE: admin_menu action executed before admin_init.
|
7154 |
+
*
|
7155 |
+
* @author Vova Feldman (@svovaf)
|
7156 |
+
* @since 1.0.7
|
7157 |
+
*/
|
7158 |
+
function _admin_init_action() {
|
7159 |
+
$is_migration = $this->is_migration();
|
7160 |
+
|
7161 |
+
/**
|
7162 |
+
* Automatically redirect to connect/activation page after plugin activation.
|
7163 |
+
*
|
7164 |
+
* @since 1.1.7 Do NOT redirect to opt-in when running in network admin mode.
|
7165 |
+
*/
|
7166 |
+
if ( $this->is_plugin_activation() ) {
|
7167 |
+
delete_transient( "fs_{$this->_module_type}_{$this->_slug}_activated" );
|
7168 |
+
|
7169 |
+
if ( isset( $_GET['activate-multi'] ) ) {
|
7170 |
+
/**
|
7171 |
+
* Don't redirect if activating multiple plugins at once (bulk activation).
|
7172 |
+
*/
|
7173 |
+
} else if ( ! $is_migration ) {
|
7174 |
+
$this->_redirect_on_activation_hook();
|
7175 |
+
return;
|
7176 |
+
}
|
7177 |
+
}
|
7178 |
+
|
7179 |
+
if ( $is_migration ) {
|
7180 |
+
return;
|
7181 |
+
}
|
7182 |
+
|
7183 |
+
if ( fs_request_is_action( $this->get_unique_affix() . '_skip_activation' ) ) {
|
7184 |
+
check_admin_referer( $this->get_unique_affix() . '_skip_activation' );
|
7185 |
+
|
7186 |
+
$this->skip_connection( null, fs_is_network_admin() );
|
7187 |
+
|
7188 |
+
fs_redirect( $this->get_after_activation_url( 'after_skip_url' ) );
|
7189 |
+
}
|
7190 |
+
|
7191 |
+
if ( $this->is_network_activation_mode() &&
|
7192 |
+
fs_request_is_action( $this->get_unique_affix() . '_delegate_activation' )
|
7193 |
+
) {
|
7194 |
+
check_admin_referer( $this->get_unique_affix() . '_delegate_activation' );
|
7195 |
+
|
7196 |
+
$this->delegate_connection();
|
7197 |
+
|
7198 |
+
fs_redirect( $this->get_after_activation_url( 'after_delegation_url' ) );
|
7199 |
+
}
|
7200 |
+
|
7201 |
+
$this->_add_upgrade_action_link();
|
7202 |
+
|
7203 |
+
if ( ! ( ! $this->_is_network_active && fs_is_network_admin() ) &&
|
7204 |
+
(
|
7205 |
+
( true === $this->_storage->require_license_activation ) ||
|
7206 |
+
// Not registered nor anonymous.
|
7207 |
+
( ! $this->is_registered() && ! $this->is_anonymous() ) ||
|
7208 |
+
// OR, network level and in network upgrade mode.
|
7209 |
+
( fs_is_network_admin() && $this->_is_network_active && $this->is_network_upgrade_mode() )
|
7210 |
+
)
|
7211 |
+
) {
|
7212 |
+
if ( ! $this->is_pending_activation() ) {
|
7213 |
+
if ( ! $this->is_activation_page() ) {
|
7214 |
+
/**
|
7215 |
+
* If a user visits any other admin page before activating the premium-only theme with a valid
|
7216 |
+
* license, reactivate the previous theme.
|
7217 |
+
*
|
7218 |
+
* @author Leo Fajardo (@leorw)
|
7219 |
+
* @since 1.2.2
|
7220 |
+
*/
|
7221 |
+
if ( $this->is_theme() &&
|
7222 |
+
! $this->has_settings_menu() &&
|
7223 |
+
! isset( $_REQUEST['fs_action'] ) &&
|
7224 |
+
$this->can_activate_previous_theme()
|
7225 |
+
) {
|
7226 |
+
if ( $this->is_only_premium() ) {
|
7227 |
+
$this->activate_previous_theme();
|
7228 |
+
return;
|
7229 |
+
}
|
7230 |
+
|
7231 |
+
if ( true === $this->_storage->require_license_activation ) {
|
7232 |
+
$this->_storage->require_license_activation = false;
|
7233 |
+
}
|
7234 |
+
}
|
7235 |
+
|
7236 |
+
if ( ! fs_is_network_admin() &&
|
7237 |
+
$this->is_network_activation_mode() &&
|
7238 |
+
! $this->is_delegated_connection()
|
7239 |
+
) {
|
7240 |
+
return;
|
7241 |
+
}
|
7242 |
+
|
7243 |
+
if ( $this->is_plugin_new_install() || $this->is_only_premium() ) {
|
7244 |
+
if ( ! $this->_anonymous_mode &&
|
7245 |
+
( ! $this->is_addon() || ! $this->_parent->is_anonymous() ) ) {
|
7246 |
+
// Show notice for new plugin installations.
|
7247 |
+
$this->_admin_notices->add(
|
7248 |
+
sprintf(
|
7249 |
+
$this->get_text_inline( 'You are just one step away - %s', 'you-are-step-away' ),
|
7250 |
+
sprintf( '<b><a href="%s">%s</a></b>',
|
7251 |
+
$this->get_activation_url( array(), ! $this->is_delegated_connection() ),
|
7252 |
+
sprintf( $this->get_text_x_inline( 'Complete "%s" Activation Now',
|
7253 |
+
'%s - plugin name. As complete "PluginX" activation now', 'activate-x-now' ), $this->get_plugin_name() )
|
7254 |
+
)
|
7255 |
+
),
|
7256 |
+
'',
|
7257 |
+
'update-nag'
|
7258 |
+
);
|
7259 |
+
}
|
7260 |
+
} else {
|
7261 |
+
if ( $this->should_add_sticky_optin_notice() ) {
|
7262 |
+
$this->add_sticky_optin_admin_notice();
|
7263 |
+
}
|
7264 |
+
|
7265 |
+
if ( $this->has_filter( 'optin_pointer_element' ) ) {
|
7266 |
+
// Don't show admin nag if plugin update.
|
7267 |
+
wp_enqueue_script( 'wp-pointer' );
|
7268 |
+
wp_enqueue_style( 'wp-pointer' );
|
7269 |
+
|
7270 |
+
$this->_enqueue_connect_essentials();
|
7271 |
+
|
7272 |
+
add_action( 'admin_print_footer_scripts', array(
|
7273 |
+
$this,
|
7274 |
+
'_add_connect_pointer_script'
|
7275 |
+
) );
|
7276 |
+
}
|
7277 |
+
}
|
7278 |
+
}
|
7279 |
+
}
|
7280 |
+
|
7281 |
+
if ( $this->show_opt_in_on_themes_page() &&
|
7282 |
+
$this->is_activation_page()
|
7283 |
+
) {
|
7284 |
+
$this->_show_theme_activation_optin_dialog();
|
7285 |
+
}
|
7286 |
+
}
|
7287 |
+
}
|
7288 |
+
|
7289 |
+
/**
|
7290 |
+
* @author Vova Feldman (@svovaf)
|
7291 |
+
* @since 2.0.0
|
7292 |
+
*
|
7293 |
+
* @return bool
|
7294 |
+
*/
|
7295 |
+
private function should_add_sticky_optin_notice() {
|
7296 |
+
if ( $this->is_addon() && $this->_parent->is_anonymous() ) {
|
7297 |
+
return false;
|
7298 |
+
}
|
7299 |
+
|
7300 |
+
if ( fs_is_network_admin() ) {
|
7301 |
+
if ( ! $this->_is_network_active ) {
|
7302 |
+
return false;
|
7303 |
+
}
|
7304 |
+
|
7305 |
+
if ( ! $this->is_network_activation_mode() ) {
|
7306 |
+
return false;
|
7307 |
+
}
|
7308 |
+
|
7309 |
+
return ! isset( $this->_storage->sticky_optin_added_ms );
|
7310 |
+
}
|
7311 |
+
|
7312 |
+
if ( ! $this->is_activation_mode() ) {
|
7313 |
+
return false;
|
7314 |
+
}
|
7315 |
+
|
7316 |
+
// If running from a blog admin and delegated the connection.
|
7317 |
+
return ! isset( $this->_storage->sticky_optin_added );
|
7318 |
+
}
|
7319 |
+
|
7320 |
+
/**
|
7321 |
+
* @author Leo Fajardo (@leorw)
|
7322 |
+
* @since 2.0.0
|
7323 |
+
*/
|
7324 |
+
private function add_sticky_optin_admin_notice() {
|
7325 |
+
if ( ! $this->_is_network_active || ! fs_is_network_admin() ) {
|
7326 |
+
$this->_storage->sticky_optin_added = true;
|
7327 |
+
} else {
|
7328 |
+
$this->_storage->sticky_optin_added_ms = true;
|
7329 |
+
}
|
7330 |
+
|
7331 |
+
// Show notice for new plugin installations.
|
7332 |
+
$this->_admin_notices->add_sticky(
|
7333 |
+
sprintf(
|
7334 |
+
$this->get_text_inline( 'We made a few tweaks to the %s, %s', 'few-plugin-tweaks' ),
|
7335 |
+
$this->_module_type,
|
7336 |
+
sprintf( '<b><a href="%s">%s</a></b>',
|
7337 |
+
$this->get_activation_url(),
|
7338 |
+
sprintf( $this->get_text_inline( 'Opt in to make "%s" better!', 'optin-x-now' ), $this->get_plugin_name() )
|
7339 |
+
)
|
7340 |
+
),
|
7341 |
+
'connect_account',
|
7342 |
+
'',
|
7343 |
+
'update-nag'
|
7344 |
+
);
|
7345 |
+
}
|
7346 |
+
|
7347 |
+
/**
|
7348 |
+
* Enqueue connect requires scripts and styles.
|
7349 |
+
*
|
7350 |
+
* @author Vova Feldman (@svovaf)
|
7351 |
+
* @since 1.1.4
|
7352 |
+
*/
|
7353 |
+
function _enqueue_connect_essentials() {
|
7354 |
+
wp_enqueue_script( 'jquery' );
|
7355 |
+
wp_enqueue_script( 'json2' );
|
7356 |
+
|
7357 |
+
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
|
7358 |
+
fs_enqueue_local_script( 'fs-postmessage', 'postmessage.js' );
|
7359 |
+
|
7360 |
+
fs_enqueue_local_style( 'fs_connect', '/admin/connect.css' );
|
7361 |
+
}
|
7362 |
+
|
7363 |
+
/**
|
7364 |
+
* Add connect / opt-in pointer.
|
7365 |
+
*
|
7366 |
+
* @author Vova Feldman (@svovaf)
|
7367 |
+
* @since 1.1.4
|
7368 |
+
*/
|
7369 |
+
function _add_connect_pointer_script() {
|
7370 |
+
$vars = array( 'id' => $this->_module_id );
|
7371 |
+
$pointer_content = fs_get_template( 'connect.php', $vars );
|
7372 |
+
?>
|
7373 |
+
<script type="text/javascript">// <![CDATA[
|
7374 |
+
jQuery(document).ready(function ($) {
|
7375 |
+
if ('undefined' !== typeof(jQuery().pointer)) {
|
7376 |
+
|
7377 |
+
var element = <?php echo $this->apply_filters( 'optin_pointer_element', '$("#non_existing_element");' ) ?>;
|
7378 |
+
|
7379 |
+
if (element.length > 0) {
|
7380 |
+
var optin = $(element).pointer($.extend(true, {}, {
|
7381 |
+
content : <?php echo json_encode( $pointer_content ) ?>,
|
7382 |
+
position : {
|
7383 |
+
edge : 'left',
|
7384 |
+
align: 'center'
|
7385 |
+
},
|
7386 |
+
buttons : function () {
|
7387 |
+
// Don't show pointer buttons.
|
7388 |
+
return '';
|
7389 |
+
},
|
7390 |
+
pointerWidth: 482
|
7391 |
+
}, <?php echo $this->apply_filters( 'optin_pointer_options_json', '{}' ) ?>));
|
7392 |
+
|
7393 |
+
<?php
|
7394 |
+
echo $this->apply_filters( 'optin_pointer_execute', "
|
7395 |
+
|
7396 |
+
optin.pointer('open');
|
7397 |
+
|
7398 |
+
// Tag the opt-in pointer with custom class.
|
7399 |
+
$('.wp-pointer #fs_connect')
|
7400 |
+
.parents('.wp-pointer.wp-pointer-top')
|
7401 |
+
.addClass('fs-opt-in-pointer');
|
7402 |
+
|
7403 |
+
", 'element', 'optin' ) ?>
|
7404 |
+
}
|
7405 |
+
}
|
7406 |
+
});
|
7407 |
+
// ]]></script>
|
7408 |
+
<?php
|
7409 |
+
}
|
7410 |
+
|
7411 |
+
/**
|
7412 |
+
* Return current page's URL.
|
7413 |
+
*
|
7414 |
+
* @author Vova Feldman (@svovaf)
|
7415 |
+
* @since 1.0.7
|
7416 |
+
*
|
7417 |
+
* @return string
|
7418 |
+
*/
|
7419 |
+
function current_page_url() {
|
7420 |
+
$url = 'http';
|
7421 |
+
|
7422 |
+
if ( isset( $_SERVER["HTTPS"] ) ) {
|
7423 |
+
if ( $_SERVER["HTTPS"] == "on" ) {
|
7424 |
+
$url .= "s";
|
7425 |
+
}
|
7426 |
+
}
|
7427 |
+
$url .= "://";
|
7428 |
+
if ( $_SERVER["SERVER_PORT"] != "80" ) {
|
7429 |
+
$url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
|
7430 |
+
} else {
|
7431 |
+
$url .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
|
7432 |
+
}
|
7433 |
+
|
7434 |
+
return esc_url( $url );
|
7435 |
+
}
|
7436 |
+
|
7437 |
+
/**
|
7438 |
+
* Check if the current page is the plugin's main admin settings page.
|
7439 |
+
*
|
7440 |
+
* @author Vova Feldman (@svovaf)
|
7441 |
+
* @since 1.0.7
|
7442 |
+
*
|
7443 |
+
* @return bool
|
7444 |
+
*/
|
7445 |
+
function _is_plugin_page() {
|
7446 |
+
return fs_is_plugin_page( $this->_menu->get_raw_slug() ) ||
|
7447 |
+
fs_is_plugin_page( $this->_slug );
|
7448 |
+
}
|
7449 |
+
|
7450 |
+
/* Events
|
7451 |
+
------------------------------------------------------------------------------------------------------------------*/
|
7452 |
+
/**
|
7453 |
+
* Delete site install from Database.
|
7454 |
+
*
|
7455 |
+
* @author Vova Feldman (@svovaf)
|
7456 |
+
* @since 1.0.1
|
7457 |
+
*
|
7458 |
+
* @param bool $store
|
7459 |
+
* @param int|null $blog_id Since 2.0.0
|
7460 |
+
*
|
7461 |
+
* @return false|int The install ID if deleted. Otherwise, FALSE (when install not exist).
|
7462 |
+
*/
|
7463 |
+
function _delete_site( $store = true, $blog_id = null ) {
|
7464 |
+
return self::_delete_site_by_slug( $this->_slug, $this->_module_type, $store, $blog_id );
|
7465 |
+
}
|
7466 |
+
|
7467 |
+
/**
|
7468 |
+
* Delete site install from Database.
|
7469 |
+
*
|
7470 |
+
* @author Vova Feldman (@svovaf)
|
7471 |
+
* @since 1.2.2.7
|
7472 |
+
*
|
7473 |
+
* @param string $slug
|
7474 |
+
* @param string $module_type
|
7475 |
+
* @param bool $store
|
7476 |
+
* @param int|null $blog_id Since 2.0.0
|
7477 |
+
*
|
7478 |
+
* @return false|int The install ID if deleted. Otherwise, FALSE (when install not exist).
|
7479 |
+
*/
|
7480 |
+
static function _delete_site_by_slug( $slug, $module_type, $store = true, $blog_id = null ) {
|
7481 |
+
$sites = self::get_all_sites( $module_type, $blog_id );
|
7482 |
+
|
7483 |
+
$install_id = false;
|
7484 |
+
|
7485 |
+
if ( isset( $sites[ $slug ] ) ) {
|
7486 |
+
if ( is_object( $sites[ $slug ] ) ) {
|
7487 |
+
$install_id = $sites[ $slug ]->id;
|
7488 |
+
}
|
7489 |
+
|
7490 |
+
unset( $sites[ $slug ] );
|
7491 |
+
|
7492 |
+
self::set_account_option_by_module( $module_type, 'sites', $sites, $store, $blog_id );
|
7493 |
+
}
|
7494 |
+
|
7495 |
+
return $install_id;
|
7496 |
+
}
|
7497 |
+
|
7498 |
+
/**
|
7499 |
+
* Delete user.
|
7500 |
+
*
|
7501 |
+
* @author Vova Feldman (@svovaf)
|
7502 |
+
* @since 2.0.0
|
7503 |
+
*
|
7504 |
+
* @param number $user_id
|
7505 |
+
* @param bool $store
|
7506 |
+
*
|
7507 |
+
* @return false|int The user ID if deleted. Otherwise, FALSE (when install not exist).
|
7508 |
+
*/
|
7509 |
+
private static function delete_user( $user_id, $store = true ) {
|
7510 |
+
$users = self::get_all_users();
|
7511 |
+
|
7512 |
+
if ( ! is_array( $users ) || ! isset( $users[ $user_id ] ) ) {
|
7513 |
+
return false;
|
7514 |
+
}
|
7515 |
+
|
7516 |
+
unset( $users[ $user_id ] );
|
7517 |
+
|
7518 |
+
self::$_accounts->set_option( 'users', $users, $store );
|
7519 |
+
|
7520 |
+
return $user_id;
|
7521 |
+
}
|
7522 |
+
|
7523 |
+
/**
|
7524 |
+
* Delete plugin's plans information.
|
7525 |
+
*
|
7526 |
+
* @param bool $store Flush to Database if true.
|
7527 |
+
* @param bool $keep_associated_plans If set to false, delete all plans, even if a plan is associated with an install.
|
7528 |
+
*
|
7529 |
+
* @author Vova Feldman (@svovaf)
|
7530 |
+
* @since 1.0.9
|
7531 |
+
*/
|
7532 |
+
private function _delete_plans( $store = true, $keep_associated_plans = true ) {
|
7533 |
+
$this->_logger->entrance();
|
7534 |
+
|
7535 |
+
$plans = self::get_all_plans( $this->_module_type );
|
7536 |
+
|
7537 |
+
$plans_to_keep = array();
|
7538 |
+
|
7539 |
+
if ( $keep_associated_plans ) {
|
7540 |
+
$plans_ids_to_keep = $this->get_plans_ids_associated_with_installs();
|
7541 |
+
foreach ( $plans_ids_to_keep as $plan_id ) {
|
7542 |
+
$plan = self::_get_plan_by_id( $plan_id );
|
7543 |
+
if ( is_object( $plan ) ) {
|
7544 |
+
$plans_to_keep[] = self::_encrypt_entity( $plan );
|
7545 |
+
}
|
7546 |
+
}
|
7547 |
+
}
|
7548 |
+
|
7549 |
+
if ( ! empty( $plans_to_keep ) ) {
|
7550 |
+
$plans[ $this->_slug ] = $plans_to_keep;
|
7551 |
+
} else {
|
7552 |
+
unset( $plans[ $this->_slug ] );
|
7553 |
+
}
|
7554 |
+
|
7555 |
+
$this->set_account_option( 'plans', $plans, $store );
|
7556 |
+
}
|
7557 |
+
|
7558 |
+
/**
|
7559 |
+
* Delete all plugin licenses.
|
7560 |
+
*
|
7561 |
+
* @author Vova Feldman (@svovaf)
|
7562 |
+
* @since 1.0.9
|
7563 |
+
*
|
7564 |
+
* @param bool $store
|
7565 |
+
*/
|
7566 |
+
private function _delete_licenses( $store = true ) {
|
7567 |
+
$this->_logger->entrance();
|
7568 |
+
|
7569 |
+
$all_licenses = self::get_all_licenses();
|
7570 |
+
|
7571 |
+
unset( $all_licenses[ $this->_module_id ] );
|
7572 |
+
|
7573 |
+
self::$_accounts->set_option( 'all_licenses', $all_licenses, $store );
|
7574 |
+
}
|
7575 |
+
|
7576 |
+
/**
|
7577 |
+
* Check if Freemius was added on new plugin installation.
|
7578 |
+
*
|
7579 |
+
* @author Vova Feldman (@svovaf)
|
7580 |
+
* @since 1.1.5
|
7581 |
+
*
|
7582 |
+
* @return bool
|
7583 |
+
*/
|
7584 |
+
function is_plugin_new_install() {
|
7585 |
+
return isset( $this->_storage->is_plugin_new_install ) &&
|
7586 |
+
$this->_storage->is_plugin_new_install;
|
7587 |
+
}
|
7588 |
+
|
7589 |
+
/**
|
7590 |
+
* Check if it's the first plugin release that is running Freemius.
|
7591 |
+
*
|
7592 |
+
* @author Vova Feldman (@svovaf)
|
7593 |
+
* @since 1.2.1.5
|
7594 |
+
*
|
7595 |
+
* @return bool
|
7596 |
+
*/
|
7597 |
+
function is_first_freemius_powered_version() {
|
7598 |
+
return empty( $this->_storage->plugin_last_version );
|
7599 |
+
}
|
7600 |
+
|
7601 |
+
/**
|
7602 |
+
* @author Leo Fajardo (@leorw)
|
7603 |
+
* @since 1.2.2
|
7604 |
+
*
|
7605 |
+
* @return bool|string
|
7606 |
+
*/
|
7607 |
+
private function get_previous_theme_slug() {
|
7608 |
+
return isset( $this->_storage->previous_theme ) ?
|
7609 |
+
$this->_storage->previous_theme :
|
7610 |
+
false;
|
7611 |
+
}
|
7612 |
+
|
7613 |
+
/**
|
7614 |
+
* @author Leo Fajardo (@leorw)
|
7615 |
+
* @since 1.2.2
|
7616 |
+
*
|
7617 |
+
* @return string
|
7618 |
+
*/
|
7619 |
+
private function can_activate_previous_theme() {
|
7620 |
+
$slug = $this->get_previous_theme_slug();
|
7621 |
+
if ( false !== $slug && current_user_can( 'switch_themes' ) ) {
|
7622 |
+
$theme_instance = wp_get_theme( $slug );
|
7623 |
+
|
7624 |
+
return $theme_instance->exists();
|
7625 |
+
}
|
7626 |
+
|
7627 |
+
return false;
|
7628 |
+
}
|
7629 |
+
|
7630 |
+
/**
|
7631 |
+
* @author Leo Fajardo (@leorw)
|
7632 |
+
* @since 1.2.2
|
7633 |
+
*/
|
7634 |
+
private function activate_previous_theme() {
|
7635 |
+
switch_theme( $this->get_previous_theme_slug() );
|
7636 |
+
unset( $this->_storage->previous_theme );
|
7637 |
+
|
7638 |
+
global $pagenow;
|
7639 |
+
if ( 'themes.php' === $pagenow ) {
|
7640 |
+
/**
|
7641 |
+
* Refresh the active theme information.
|
7642 |
+
*
|
7643 |
+
* @author Leo Fajardo (@leorw)
|
7644 |
+
* @since 1.2.2
|
7645 |
+
*/
|
7646 |
+
fs_redirect( $this->admin_url( $pagenow ) );
|
7647 |
+
}
|
7648 |
+
}
|
7649 |
+
|
7650 |
+
/**
|
7651 |
+
* @author Leo Fajardo (@leorw)
|
7652 |
+
* @since 1.2.2
|
7653 |
+
*
|
7654 |
+
* @return string
|
7655 |
+
*/
|
7656 |
+
function get_previous_theme_activation_url() {
|
7657 |
+
if ( ! $this->can_activate_previous_theme() ) {
|
7658 |
+
return '';
|
7659 |
+
}
|
7660 |
+
|
7661 |
+
/**
|
7662 |
+
* Activation URL
|
7663 |
+
*
|
7664 |
+
* @author Leo Fajardo (@leorw)
|
7665 |
+
* @since 1.2.2
|
7666 |
+
*/
|
7667 |
+
return wp_nonce_url(
|
7668 |
+
$this->admin_url( 'themes.php?action=activate&stylesheet=' . urlencode( $this->get_previous_theme_slug() ) ),
|
7669 |
+
'switch-theme_' . $this->get_previous_theme_slug()
|
7670 |
+
);
|
7671 |
+
}
|
7672 |
+
|
7673 |
+
/**
|
7674 |
+
* Saves the slug of the previous theme if it still exists so that it can be used by the logic in the opt-in
|
7675 |
+
* form that decides whether to add a close button to the opt-in dialog or not. So after a premium-only theme is
|
7676 |
+
* activated, the close button will appear and will reactivate the previous theme if clicked. If the previous
|
7677 |
+
* theme doesn't exist, then there will be no close button.
|
7678 |
+
*
|
7679 |
+
* @author Leo Fajardo (@leorw)
|
7680 |
+
* @since 1.2.2
|
7681 |
+
*
|
7682 |
+
* @param string $slug_or_name Old theme's slug or name.
|
7683 |
+
* @param bool|WP_Theme $old_theme WP_Theme instance of the old theme if it still exists.
|
7684 |
+
*/
|
7685 |
+
function _activate_theme_event_hook( $slug_or_name, $old_theme = false ) {
|
7686 |
+
$this->_storage->previous_theme = ( false !== $old_theme ) ?
|
7687 |
+
$old_theme->get_stylesheet() :
|
7688 |
+
$slug_or_name;
|
7689 |
+
|
7690 |
+
$this->_activate_plugin_event_hook();
|
7691 |
+
}
|
7692 |
+
|
7693 |
+
/**
|
7694 |
+
* Plugin activated hook.
|
7695 |
+
*
|
7696 |
+
* @author Vova Feldman (@svovaf)
|
7697 |
+
* @since 1.0.1
|
7698 |
+
*
|
7699 |
+
* @uses FS_Api
|
7700 |
+
*/
|
7701 |
+
function _activate_plugin_event_hook() {
|
7702 |
+
$this->_logger->entrance( 'slug = ' . $this->_slug );
|
7703 |
+
|
7704 |
+
if ( ! $this->is_user_admin() ) {
|
7705 |
+
return;
|
7706 |
+
}
|
7707 |
+
|
7708 |
+
$this->unregister_uninstall_hook();
|
7709 |
+
|
7710 |
+
// Clear API cache on activation.
|
7711 |
+
FS_Api::clear_cache();
|
7712 |
+
|
7713 |
+
$is_premium_version_activation = $this->is_plugin() ?
|
7714 |
+
( current_filter() !== ( 'activate_' . $this->_free_plugin_basename ) ) :
|
7715 |
+
$this->is_premium();
|
7716 |
+
|
7717 |
+
$this->_logger->info( 'Activating ' . ( $is_premium_version_activation ? 'premium' : 'free' ) . ' plugin version.' );
|
7718 |
+
|
7719 |
+
if ( $this->is_plugin() ) {
|
7720 |
+
// This logic is relevant only to plugins since both the free and premium versions of a plugin can be active at the same time.
|
7721 |
+
// 1. If running in the activation of the FREE module, get the basename of the PREMIUM.
|
7722 |
+
// 2. If running in the activation of the PREMIUM module, get the basename of the FREE.
|
7723 |
+
$other_version_basename = $is_premium_version_activation ?
|
7724 |
+
$this->_free_plugin_basename :
|
7725 |
+
$this->premium_plugin_basename();
|
7726 |
+
|
7727 |
+
if ( ! $this->_is_network_active ) {
|
7728 |
+
/**
|
7729 |
+
* Themes are always network activated, but the ACTUAL activation is per site.
|
7730 |
+
*
|
7731 |
+
* During the activation, the plugin isn't yet active, therefore,
|
7732 |
+
* _is_network_active will be set to false even if it's a network level
|
7733 |
+
* activation. So we need to fix that by looking at the is_network_admin() value.
|
7734 |
+
*
|
7735 |
+
* @author Vova Feldman
|
7736 |
+
*/
|
7737 |
+
$this->_is_network_active = (
|
7738 |
+
$this->_is_multisite_integrated &&
|
7739 |
+
fs_is_network_admin()
|
7740 |
+
);
|
7741 |
+
}
|
7742 |
+
|
7743 |
+
/**
|
7744 |
+
* If the other module version is active, deactivate it.
|
7745 |
+
*
|
7746 |
+
* is_plugin_active() checks if the plugin is active on the site or the network level and
|
7747 |
+
* deactivate_plugins() deactivates the plugin whether it's activated on the site or network level.
|
7748 |
+
*
|
7749 |
+
* @author Leo Fajardo (@leorw)
|
7750 |
+
* @since 1.2.2
|
7751 |
+
*/
|
7752 |
+
if (
|
7753 |
+
is_plugin_active( $other_version_basename ) &&
|
7754 |
+
$this->apply_filters( 'deactivate_on_activation', true )
|
7755 |
+
) {
|
7756 |
+
deactivate_plugins( $other_version_basename );
|
7757 |
+
}
|
7758 |
+
}
|
7759 |
+
|
7760 |
+
if ( $this->is_registered() ) {
|
7761 |
+
if ( $is_premium_version_activation ) {
|
7762 |
+
$this->reconnect_locally();
|
7763 |
+
}
|
7764 |
+
|
7765 |
+
|
7766 |
+
// Schedule re-activation event and sync.
|
7767 |
+
// $this->sync_install( array(), true );
|
7768 |
+
$this->schedule_install_sync();
|
7769 |
+
|
7770 |
+
// If activating the premium module version, add an admin notice to congratulate for an upgrade completion.
|
7771 |
+
if ( $is_premium_version_activation ) {
|
7772 |
+
$this->_admin_notices->add(
|
7773 |
+
sprintf( $this->get_text_inline( 'The upgrade of %s was successfully completed.', 'successful-version-upgrade-message' ), sprintf( '<b>%s</b>', $this->_plugin->title ) ),
|
7774 |
+
$this->get_text_x_inline( 'W00t',
|
7775 |
+
'Used to express elation, enthusiasm, or triumph (especially in electronic communication).', 'woot' ) . '!'
|
7776 |
+
);
|
7777 |
+
}
|
7778 |
+
} else if ( $this->is_anonymous() ) {
|
7779 |
+
if ( isset( $this->_storage->is_anonymous_ms ) && $this->_storage->is_anonymous_ms['is'] ) {
|
7780 |
+
$plugin_version = $this->_storage->is_anonymous_ms['version'];
|
7781 |
+
$network = true;
|
7782 |
+
} else {
|
7783 |
+
$plugin_version = $this->_storage->is_anonymous['version'];
|
7784 |
+
$network = false;
|
7785 |
+
}
|
7786 |
+
|
7787 |
+
/**
|
7788 |
+
* Reset "skipped" click cache on the following:
|
7789 |
+
* 1. Freemius DEV mode.
|
7790 |
+
* 2. WordPress DEBUG mode.
|
7791 |
+
* 3. If a plugin and the user skipped the exact same version before.
|
7792 |
+
*
|
7793 |
+
* @since 1.2.2.7 Ulrich Pogson (@grapplerulrich) asked to not reset the SKIPPED flag if the exact same THEME version was activated before unless the developer is running with WP_DEBUG on, or Freemius debug mode on (WP_FS__DEV_MODE).
|
7794 |
+
*
|
7795 |
+
* @todo 4. If explicitly asked to retry after every activation.
|
7796 |
+
*/
|
7797 |
+
if ( WP_FS__DEV_MODE ||
|
7798 |
+
(
|
7799 |
+
( $this->is_plugin() || ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ) &&
|
7800 |
+
$this->get_plugin_version() == $plugin_version
|
7801 |
+
)
|
7802 |
+
) {
|
7803 |
+
$this->reset_anonymous_mode( $network );
|
7804 |
+
}
|
7805 |
+
}
|
7806 |
+
|
7807 |
+
$is_trial_or_has_features_enabled_license = ( $this->is_trial() || $this->has_features_enabled_license() );
|
7808 |
+
|
7809 |
+
if ( $this->is_addon() && ! $is_trial_or_has_features_enabled_license ) {
|
7810 |
+
/**
|
7811 |
+
* When activating an add-on, try to also activate a license.
|
7812 |
+
*
|
7813 |
+
* @author Leo Fajardo (@leorw)
|
7814 |
+
* @since 2.3.0
|
7815 |
+
*/
|
7816 |
+
if ( ! $this->_is_network_active ) {
|
7817 |
+
$this->maybe_activate_addon_license();
|
7818 |
+
} else {
|
7819 |
+
$this->maybe_network_activate_addon_license();
|
7820 |
+
}
|
7821 |
+
|
7822 |
+
/**
|
7823 |
+
* Avoid redirecting to the license activation screen after automatically activating an add-on license.
|
7824 |
+
*
|
7825 |
+
* @author Leo Fajardo (@leorw)
|
7826 |
+
* @since 2.3.0
|
7827 |
+
*/
|
7828 |
+
$is_trial_or_has_features_enabled_license = ( $this->is_trial() || $this->has_features_enabled_license() );
|
7829 |
+
|
7830 |
+
if ( $is_trial_or_has_features_enabled_license && true === $this->_storage->require_license_activation ) {
|
7831 |
+
$this->_storage->require_license_activation = false;
|
7832 |
+
}
|
7833 |
+
}
|
7834 |
+
|
7835 |
+
if (
|
7836 |
+
$is_premium_version_activation &&
|
7837 |
+
(
|
7838 |
+
( ! $this->is_registered() && $this->is_anonymous() ) ||
|
7839 |
+
(
|
7840 |
+
$this->is_registered() &&
|
7841 |
+
! $is_trial_or_has_features_enabled_license
|
7842 |
+
)
|
7843 |
+
)
|
7844 |
+
) {
|
7845 |
+
$this->_storage->require_license_activation = true;
|
7846 |
+
}
|
7847 |
+
|
7848 |
+
if ( ! isset( $this->_storage->is_plugin_new_install ) ) {
|
7849 |
+
/**
|
7850 |
+
* If no previous version of plugin's version exist, it means that it's either
|
7851 |
+
* the first time that the plugin installed on the site, or the plugin was installed
|
7852 |
+
* before but didn't have Freemius integrated.
|
7853 |
+
*
|
7854 |
+
* Since register_activation_hook() do NOT fires on updates since 3.1, and only fires
|
7855 |
+
* on manual activation via the dashboard, is_plugin_activation() is TRUE
|
7856 |
+
* only after immediate activation.
|
7857 |
+
*
|
7858 |
+
* @since 1.1.4
|
7859 |
+
* @link https://make.wordpress.org/core/2010/10/27/plugin-activation-hooks-no-longer-fire-for-updates/
|
7860 |
+
*/
|
7861 |
+
$this->_storage->is_plugin_new_install = empty( $this->_storage->plugin_last_version );
|
7862 |
+
}
|
7863 |
+
|
7864 |
+
/**
|
7865 |
+
* Also flush when activating the premium version so that even if Freemius was off before, the API
|
7866 |
+
* connectivity test can be run again.
|
7867 |
+
*
|
7868 |
+
* @author Leo Fajardo (@leorw)
|
7869 |
+
* @since 2.2.3.1
|
7870 |
+
*/
|
7871 |
+
$has_api_connectivity = $this->has_api_connectivity( WP_FS__DEV_MODE || $is_premium_version_activation );
|
7872 |
+
|
7873 |
+
if ( ! $this->_anonymous_mode &&
|
7874 |
+
$has_api_connectivity &&
|
7875 |
+
! $this->_isAutoInstall
|
7876 |
+
) {
|
7877 |
+
// Store hint that the plugin was just activated to enable auto-redirection to settings.
|
7878 |
+
set_transient( "fs_{$this->_module_type}_{$this->_slug}_activated", true, 60 );
|
7879 |
+
}
|
7880 |
+
|
7881 |
+
/**
|
7882 |
+
* Activation hook is executed after the plugin's main file is loaded, therefore,
|
7883 |
+
* after the plugin was loaded. The logic is located at activate_plugin()
|
7884 |
+
* ./wp-admin/includes/plugin.php.
|
7885 |
+
*
|
7886 |
+
* @author Vova Feldman (@svovaf)
|
7887 |
+
* @since 1.1.9
|
7888 |
+
*/
|
7889 |
+
$this->_storage->was_plugin_loaded = true;
|
7890 |
+
}
|
7891 |
+
|
7892 |
+
/**
|
7893 |
+
* @author Leo Fajardo (@leorw)
|
7894 |
+
* @since 2.3.0
|
7895 |
+
*/
|
7896 |
+
private function maybe_activate_addon_license() {
|
7897 |
+
$parent_fs = $this->get_parent_instance();
|
7898 |
+
|
7899 |
+
if (
|
7900 |
+
! is_object( $parent_fs ) ||
|
7901 |
+
( ! $parent_fs->is_registered() && ! $parent_fs->is_network_registered() )
|
7902 |
+
) {
|
7903 |
+
// Try to activate a license only if the parent plugin is active and has a valid `install`.
|
7904 |
+
return;
|
7905 |
+
}
|
7906 |
+
|
7907 |
+
$license = $this->get_active_parent_license();
|
7908 |
+
if ( ! is_object( $license ) ) {
|
7909 |
+
return;
|
7910 |
+
}
|
7911 |
+
|
7912 |
+
if (
|
7913 |
+
$this->is_bundle_license_auto_activation_enabled() &&
|
7914 |
+
! empty( $license->products )
|
7915 |
+
) {
|
7916 |
+
$this->activate_bundle_license( $license );
|
7917 |
+
|
7918 |
+
return;
|
7919 |
+
}
|
7920 |
+
|
7921 |
+
if ( ! $this->is_registered() ) {
|
7922 |
+
// Opt in with a license key.
|
7923 |
+
$this->opt_in(
|
7924 |
+
$parent_fs->get_current_or_network_user()->email,
|
7925 |
+
false,
|
7926 |
+
false,
|
7927 |
+
$license->secret_key
|
7928 |
+
);
|
7929 |
+
} else {
|
7930 |
+
// Activate the license.
|
7931 |
+
$install = $this->get_api_site_scope()->call(
|
7932 |
+
'/',
|
7933 |
+
'put',
|
7934 |
+
array( 'license_key' => $this->apply_filters( 'license_key', $license->secret_key ) )
|
7935 |
+
);
|
7936 |
+
|
7937 |
+
if ( ! FS_Api::is_api_error( $install ) ) {
|
7938 |
+
$this->_sync_addon_license( $this->get_id(), true );
|
7939 |
+
}
|
7940 |
+
}
|
7941 |
+
}
|
7942 |
+
|
7943 |
+
/**
|
7944 |
+
* @author Leo Fajardo (@leorw)
|
7945 |
+
* @since 2.3.0
|
7946 |
+
*
|
7947 |
+
* @param FS_Plugin_License $license
|
7948 |
+
*/
|
7949 |
+
private function maybe_network_activate_addon_license( $license = null ) {
|
7950 |
+
$parent_fs = $this->get_parent_instance();
|
7951 |
+
if ( ! is_object( $parent_fs ) || ( ! $parent_fs->is_registered() && ! $parent_fs->is_network_registered() ) ) {
|
7952 |
+
// Try to activate a license only if the parent plugin is active and has a valid `install`.
|
7953 |
+
return;
|
7954 |
+
}
|
7955 |
+
|
7956 |
+
$license = ( ! is_null( $license ) ) ?
|
7957 |
+
$license :
|
7958 |
+
$this->get_active_parent_license();
|
7959 |
+
|
7960 |
+
if ( ! is_object( $license ) ) {
|
7961 |
+
return;
|
7962 |
+
}
|
7963 |
+
|
7964 |
+
if (
|
7965 |
+
$this->is_bundle_license_auto_activation_enabled() &&
|
7966 |
+
! empty( $license->products )
|
7967 |
+
) {
|
7968 |
+
$this->activate_bundle_license( $license );
|
7969 |
+
|
7970 |
+
return;
|
7971 |
+
}
|
7972 |
+
|
7973 |
+
if ( ! $this->is_network_registered() ) {
|
7974 |
+
$sites = $this->get_sites_for_network_level_optin();
|
7975 |
+
|
7976 |
+
if ( count( $sites ) > $license->left() ) {
|
7977 |
+
// If the add-on is network active, try to activate the license only if it can be activated on all sites.
|
7978 |
+
return;
|
7979 |
+
}
|
7980 |
+
|
7981 |
+
// Opt in with a license key.
|
7982 |
+
$this->opt_in(
|
7983 |
+
$parent_fs->get_user()->email,
|
7984 |
+
false,
|
7985 |
+
false,
|
7986 |
+
$license->secret_key,
|
7987 |
+
false,
|
7988 |
+
false,
|
7989 |
+
false,
|
7990 |
+
null,
|
7991 |
+
$sites
|
7992 |
+
);
|
7993 |
+
} else {
|
7994 |
+
$blog_2_install_map = array();
|
7995 |
+
$site_ids = array();
|
7996 |
+
|
7997 |
+
$all_sites = Freemius::get_sites();
|
7998 |
+
|
7999 |
+
foreach ( $all_sites as $site ) {
|
8000 |
+
$blog_id = Freemius::get_site_blog_id( $site );
|
8001 |
+
$install = $this->get_install_by_blog_id( $blog_id );
|
8002 |
+
|
8003 |
+
if ( is_object( $install ) && FS_Plugin_License::is_valid_id( $install->license_id ) ) {
|
8004 |
+
// Skip license activation for installs that are already associated with a license.
|
8005 |
+
continue;
|
8006 |
+
}
|
8007 |
+
|
8008 |
+
if ( is_object( $install ) ) {
|
8009 |
+
$blog_2_install_map[ $blog_id ] = $install;
|
8010 |
+
} else {
|
8011 |
+
$site_ids[] = $blog_id;
|
8012 |
+
}
|
8013 |
+
}
|
8014 |
+
|
8015 |
+
if ( ( count( $blog_2_install_map ) + count( $site_ids ) ) > $license->left() ) {
|
8016 |
+
return;
|
8017 |
+
}
|
8018 |
+
|
8019 |
+
$user = $this->get_current_or_network_user();
|
8020 |
+
|
8021 |
+
if ( ! empty( $blog_2_install_map ) ) {
|
8022 |
+
$result = $this->activate_license_on_many_installs( $user, $license->secret_key, $blog_2_install_map );
|
8023 |
+
|
8024 |
+
if ( true !== $result ) {
|
8025 |
+
return;
|
8026 |
+
}
|
8027 |
+
}
|
8028 |
+
|
8029 |
+
if ( ! empty( $site_ids ) ) {
|
8030 |
+
$this->activate_license_on_many_sites( $user, $license->secret_key, $site_ids );
|
8031 |
+
}
|
8032 |
+
}
|
8033 |
+
}
|
8034 |
+
|
8035 |
+
/**
|
8036 |
+
* Tries to activate a bundle license for all supported products if the current product is activated with a bundle license. This is called after activating an available license (not via the license activation dialog but by clicking on a license activation button) for a product via its "Account" page.
|
8037 |
+
*
|
8038 |
+
* @author Leo Fajardo (@leorw)
|
8039 |
+
* @since 2.4.0
|
8040 |
+
*
|
8041 |
+
* @param FS_Plugin_License $license
|
8042 |
+
* @param array $sites
|
8043 |
+
* @param int $blog_id
|
8044 |
+
*/
|
8045 |
+
private function maybe_activate_bundle_license( FS_Plugin_License $license = null, $sites = array(), $blog_id = 0 ) {
|
8046 |
+
if ( ! is_object( $license ) && $this->has_active_valid_license() ) {
|
8047 |
+
$license = $this->_license;
|
8048 |
+
}
|
8049 |
+
|
8050 |
+
if ( ! is_object( $license ) ) {
|
8051 |
+
return;
|
8052 |
+
}
|
8053 |
+
|
8054 |
+
$parent_license = ( ! empty( $license->products ) ) ?
|
8055 |
+
$license :
|
8056 |
+
$this->get_active_parent_license( $license->secret_key );
|
8057 |
+
|
8058 |
+
if ( is_object( $parent_license ) ) {
|
8059 |
+
$this->activate_bundle_license( $parent_license, $sites, $blog_id );
|
8060 |
+
}
|
8061 |
+
}
|
8062 |
+
|
8063 |
+
/**
|
8064 |
+
* Try to activate a bundle license for all the bundle products installed on the site.
|
8065 |
+
* (1) If a child product install already has a license, the bundle license won't be activated.
|
8066 |
+
* (2) On multi-site networks, if the attempt to activate the bundle license is triggered from the network admin, the bundle license activation will only work for non-delegated sites and only if none of them is associated with a license. Even if one of the sites has the product installed with a license key, skip the bundle license activation for the product.
|
8067 |
+
* (3) On multi-site networks, if the attempt to activate the bundle license is triggered from a site-level admin, only activate the license if the product is site-level activated or delegated, and the product installation is not yet associated with a license.
|
8068 |
+
*
|
8069 |
+
* @author Leo Fajardo (@leorw)
|
8070 |
+
* @since 2.4.0
|
8071 |
+
*
|
8072 |
+
* @param FS_Plugin_License $license
|
8073 |
+
* @param array $sites
|
8074 |
+
* @param int $current_blog_id
|
8075 |
+
*/
|
8076 |
+
private function activate_bundle_license( $license, $sites = array(), $current_blog_id = 0 ) {
|
8077 |
+
$is_network_admin = fs_is_network_admin();
|
8078 |
+
|
8079 |
+
$installs_by_blog_map = array();
|
8080 |
+
$site_info_by_blog_map = array();
|
8081 |
+
|
8082 |
+
/**
|
8083 |
+
* Try to activate the license for all supported products.
|
8084 |
+
*
|
8085 |
+
* @author Leo Fajardo
|
8086 |
+
*/
|
8087 |
+
foreach ( $license->products as $product_id ) {
|
8088 |
+
$fs = self::get_instance_by_id( $product_id );
|
8089 |
+
|
8090 |
+
if ( ! is_object( $fs ) ) {
|
8091 |
+
continue;
|
8092 |
+
}
|
8093 |
+
|
8094 |
+
if ( ! $fs->has_paid_plan() ) {
|
8095 |
+
continue;
|
8096 |
+
}
|
8097 |
+
|
8098 |
+
if (
|
8099 |
+
! $fs->is_addon() &&
|
8100 |
+
! FS_Plan_Manager::instance()->has_paid_plan( $fs->_plans )
|
8101 |
+
) {
|
8102 |
+
/**
|
8103 |
+
* The parent product can be free-only but can have its `has_paid_plan` flag set to `true` when
|
8104 |
+
* there is a context bundle.
|
8105 |
+
*/
|
8106 |
+
continue;
|
8107 |
+
}
|
8108 |
+
|
8109 |
+
if ( $current_blog_id > 0 ) {
|
8110 |
+
$fs->switch_to_blog( $current_blog_id );
|
8111 |
+
}
|
8112 |
+
|
8113 |
+
if ( $fs->has_active_valid_license() ) {
|
8114 |
+
continue;
|
8115 |
+
}
|
8116 |
+
|
8117 |
+
if ( ! $is_network_admin || $current_blog_id > 0 ) {
|
8118 |
+
if ( $fs->is_network_active() && ! $fs->is_delegated_connection( $current_blog_id ) ) {
|
8119 |
+
// Do not try to activate the license in the site level if the product is network active and the connection was not delegated.
|
8120 |
+
continue;
|
8121 |
+
}
|
8122 |
+
} else {
|
8123 |
+
if ( ! $fs->is_network_active() ) {
|
8124 |
+
// Do not try to activate the license in the network level if the product is not network active.
|
8125 |
+
continue;
|
8126 |
+
}
|
8127 |
+
|
8128 |
+
if ( $fs->is_network_delegated_connection() ) {
|
8129 |
+
// Do not try to activate the license in the network level if the activation has been delegated to site admins.
|
8130 |
+
continue;
|
8131 |
+
}
|
8132 |
+
|
8133 |
+
$has_install_with_license = false;
|
8134 |
+
|
8135 |
+
// Collection of sites that have an install entity that is not activated with a license or non-delegated sites that have no install entity, or both types of site.
|
8136 |
+
$filtered_sites = array();
|
8137 |
+
|
8138 |
+
if ( empty( $sites ) ) {
|
8139 |
+
$all_sites = self::get_sites();
|
8140 |
+
|
8141 |
+
foreach ( $all_sites as $site ) {
|
8142 |
+
$sites[] = array( 'blog_id' => self::get_site_blog_id( $site ) );
|
8143 |
+
}
|
8144 |
+
} else {
|
8145 |
+
// Populate the map here to avoid calling `$fs->get_site_info( $site );` in the other `for` loop below.
|
8146 |
+
foreach ( $sites as $site ) {
|
8147 |
+
if ( ! isset( $site['blog_id'] ) || ! is_numeric( $site['blog_id'] ) ) {
|
8148 |
+
continue;
|
8149 |
+
}
|
8150 |
+
|
8151 |
+
$site_info_by_blog_map[ $site['blog_id'] ] = $site;
|
8152 |
+
}
|
8153 |
+
}
|
8154 |
+
|
8155 |
+
foreach ( $sites as $site ) {
|
8156 |
+
if ( ! isset( $site['blog_id'] ) || ! is_numeric( $site['blog_id'] ) ) {
|
8157 |
+
continue;
|
8158 |
+
}
|
8159 |
+
|
8160 |
+
$blog_id = $site['blog_id'];
|
8161 |
+
|
8162 |
+
if ( ! isset( $installs_by_blog_map[ $blog_id ] ) ) {
|
8163 |
+
$installs_by_blog_map[ $blog_id ] = self::get_all_sites( $fs->get_module_type(), $blog_id );
|
8164 |
+
}
|
8165 |
+
|
8166 |
+
$installs = $installs_by_blog_map[ $blog_id ];
|
8167 |
+
$install = null;
|
8168 |
+
|
8169 |
+
if ( isset( $installs[ $fs->get_slug() ] ) ) {
|
8170 |
+
$install = $installs[ $fs->get_slug() ];
|
8171 |
+
|
8172 |
+
if (
|
8173 |
+
is_object( $install ) &&
|
8174 |
+
(
|
8175 |
+
! FS_Site::is_valid_id( $install->id ) ||
|
8176 |
+
! FS_User::is_valid_id( $install->user_id ) ||
|
8177 |
+
! FS_Plugin_Plan::is_valid_id( $install->plan_id )
|
8178 |
+
)
|
8179 |
+
) {
|
8180 |
+
$install = null;
|
8181 |
+
}
|
8182 |
+
}
|
8183 |
+
|
8184 |
+
if (
|
8185 |
+
is_object( $install ) &&
|
8186 |
+
FS_Plugin_License::is_valid_id( $install->license_id )
|
8187 |
+
) {
|
8188 |
+
$has_install_with_license = true;
|
8189 |
+
break;
|
8190 |
+
}
|
8191 |
+
|
8192 |
+
if ( $fs->is_site_delegated_connection( $blog_id ) ) {
|
8193 |
+
// Site activation delegated, don't activate bundle license on the site in the network admin.
|
8194 |
+
continue;
|
8195 |
+
}
|
8196 |
+
|
8197 |
+
if ( ! isset( $site_info_by_blog_map[ $blog_id ] ) ) {
|
8198 |
+
$site_info_by_blog_map[ $blog_id ] = $fs->get_site_info( $site );
|
8199 |
+
}
|
8200 |
+
|
8201 |
+
$filtered_sites[] = $site_info_by_blog_map[ $blog_id ];
|
8202 |
+
}
|
8203 |
+
|
8204 |
+
if ( $has_install_with_license || empty( $filtered_sites ) ) {
|
8205 |
+
// Do not try to activate the license at the network level if there's any install with a license or there's no site to activate the license on.
|
8206 |
+
continue;
|
8207 |
+
}
|
8208 |
+
|
8209 |
+
$sites = $filtered_sites;
|
8210 |
+
}
|
8211 |
+
|
8212 |
+
$fs->activate_migrated_license(
|
8213 |
+
$license->secret_key,
|
8214 |
+
null,
|
8215 |
+
null,
|
8216 |
+
$sites,
|
8217 |
+
( $current_blog_id > 0 ? $current_blog_id : null )
|
8218 |
+
);
|
8219 |
+
}
|
8220 |
+
}
|
8221 |
+
|
8222 |
+
/**
|
8223 |
+
* Returns a parent license that can be activated for the context product.
|
8224 |
+
*
|
8225 |
+
* @author Leo Fajardo (@leorw)
|
8226 |
+
* @since 2.3.0
|
8227 |
+
*
|
8228 |
+
* @param string|null $license_key
|
8229 |
+
* @param bool $flush
|
8230 |
+
*
|
8231 |
+
* @return FS_Plugin_License
|
8232 |
+
*/
|
8233 |
+
function get_active_parent_license( $license_key = null, $flush = true ) {
|
8234 |
+
$parent_licenses_endpoint = "/plugins/{$this->get_id()}/parent_licenses.json?filter=activatable";
|
8235 |
+
|
8236 |
+
$fs = $this;
|
8237 |
+
|
8238 |
+
if ( $this->is_addon() ) {
|
8239 |
+
$parent_instance = $this->get_parent_instance();
|
8240 |
+
|
8241 |
+
if ( is_object( $parent_instance ) && $parent_instance->is_registered() ) {
|
8242 |
+
$fs = $parent_instance;
|
8243 |
+
}
|
8244 |
+
}
|
8245 |
+
|
8246 |
+
$foreign_licenses = $fs->get_foreign_licenses_info(
|
8247 |
+
self::get_all_licenses( $this->get_parent_id() )
|
8248 |
+
);
|
8249 |
+
|
8250 |
+
if ( ! empty ( $foreign_licenses ) ) {
|
8251 |
+
$foreign_licenses = array(
|
8252 |
+
// Prefix with `+` to tell the server to include foreign licenses in the licenses collection.
|
8253 |
+
'ids' => ( urlencode( '+' ) . implode( ',', $foreign_licenses['ids'] ) ),
|
8254 |
+
'license_keys' => implode( ',', array_map( 'urlencode', $foreign_licenses['license_keys'] ) )
|
8255 |
+
);
|
8256 |
+
|
8257 |
+
$parent_licenses_endpoint = add_query_arg( $foreign_licenses, $parent_licenses_endpoint );
|
8258 |
+
}
|
8259 |
+
|
8260 |
+
$result = $fs->get_current_or_network_user_api_scope()->get( $parent_licenses_endpoint, $flush );
|
8261 |
+
|
8262 |
+
if (
|
8263 |
+
! $this->is_api_result_object( $result, 'licenses' ) ||
|
8264 |
+
! is_array( $result->licenses ) ||
|
8265 |
+
empty( $result->licenses )
|
8266 |
+
) {
|
8267 |
+
return null;
|
8268 |
+
}
|
8269 |
+
|
8270 |
+
$parent_license = null;
|
8271 |
+
|
8272 |
+
if ( empty( $license_key ) ) {
|
8273 |
+
$parent_license = $result->licenses[0];
|
8274 |
+
} else {
|
8275 |
+
foreach ( $result->licenses as $license ) {
|
8276 |
+
if ( $license_key === $license->secret_key ) {
|
8277 |
+
$parent_license = $license;
|
8278 |
+
break;
|
8279 |
+
}
|
8280 |
+
}
|
8281 |
+
}
|
8282 |
+
|
8283 |
+
if ( ! is_null( $parent_license ) ) {
|
8284 |
+
$parent_license = new FS_Plugin_License( $parent_license );
|
8285 |
+
}
|
8286 |
+
|
8287 |
+
return $parent_license;
|
8288 |
+
}
|
8289 |
+
|
8290 |
+
/**
|
8291 |
+
* @author Leo Fajardo (@leorw)
|
8292 |
+
* @since 2.3.0
|
8293 |
+
*
|
8294 |
+
* @return array
|
8295 |
+
*/
|
8296 |
+
function get_sites_for_network_level_optin() {
|
8297 |
+
$sites = array();
|
8298 |
+
$all_sites = self::get_sites();
|
8299 |
+
|
8300 |
+
foreach ( $all_sites as $site ) {
|
8301 |
+
$blog_id = self::get_site_blog_id( $site );
|
8302 |
+
|
8303 |
+
if ( ! $this->is_site_delegated_connection( $blog_id ) &&
|
8304 |
+
! $this->is_installed_on_site( $blog_id )
|
8305 |
+
) {
|
8306 |
+
$sites[] = $this->get_site_info( $site );
|
8307 |
+
}
|
8308 |
+
}
|
8309 |
+
|
8310 |
+
return $sites;
|
8311 |
+
}
|
8312 |
+
|
8313 |
+
/**
|
8314 |
+
* Delete account.
|
8315 |
+
*
|
8316 |
+
* @author Vova Feldman (@svovaf)
|
8317 |
+
* @since 1.0.3
|
8318 |
+
*
|
8319 |
+
* @param bool $check_user Enforce checking if user have plugins activation privileges.
|
8320 |
+
*/
|
8321 |
+
function delete_account_event( $check_user = true ) {
|
8322 |
+
$this->_logger->entrance( 'slug = ' . $this->_slug );
|
8323 |
+
|
8324 |
+
if ( $check_user && ! $this->is_user_admin() ) {
|
8325 |
+
return;
|
8326 |
+
}
|
8327 |
+
|
8328 |
+
$this->do_action( 'before_account_delete' );
|
8329 |
+
|
8330 |
+
// Clear all admin notices.
|
8331 |
+
$this->_admin_notices->clear_all_sticky( false );
|
8332 |
+
|
8333 |
+
$this->_delete_site( false );
|
8334 |
+
|
8335 |
+
$delete_network_common_data = true;
|
8336 |
+
|
8337 |
+
if ( $this->_is_network_active ) {
|
8338 |
+
$installs = $this->get_blog_install_map();
|
8339 |
+
|
8340 |
+
// Don't delete common network data unless no other installs left.
|
8341 |
+
$delete_network_common_data = empty( $installs );
|
8342 |
+
}
|
8343 |
+
|
8344 |
+
if ( $delete_network_common_data ) {
|
8345 |
+
$this->_delete_plans( false );
|
8346 |
+
|
8347 |
+
$this->_delete_licenses( false );
|
8348 |
+
|
8349 |
+
// Delete add-ons related to plugin's account.
|
8350 |
+
$this->_delete_account_addons( false );
|
8351 |
+
}
|
8352 |
+
|
8353 |
+
// @todo Delete plans and licenses of add-ons.
|
8354 |
+
|
8355 |
+
self::$_accounts->store();
|
8356 |
+
|
8357 |
+
/**
|
8358 |
+
* IMPORTANT:
|
8359 |
+
* Clear crons must be executed before clearing all storage.
|
8360 |
+
* Otherwise, the cron will not be cleared.
|
8361 |
+
*/
|
8362 |
+
if ( $delete_network_common_data ) {
|
8363 |
+
$this->clear_sync_cron();
|
8364 |
+
}
|
8365 |
+
|
8366 |
+
$this->clear_install_sync_cron();
|
8367 |
+
|
8368 |
+
// Clear all storage data.
|
8369 |
+
$this->_storage->clear_all( true, array(
|
8370 |
+
'is_delegated_connection',
|
8371 |
+
'connectivity_test',
|
8372 |
+
'is_on',
|
8373 |
+
), false );
|
8374 |
+
|
8375 |
+
// Send delete event.
|
8376 |
+
$this->get_api_site_scope()->call( '/', 'delete' );
|
8377 |
+
|
8378 |
+
$this->do_action( 'after_account_delete' );
|
8379 |
+
}
|
8380 |
+
|
8381 |
+
/**
|
8382 |
+
* Delete network level account.
|
8383 |
+
*
|
8384 |
+
* @author Vova Feldman (@svovaf)
|
8385 |
+
* @since 2.0.0
|
8386 |
+
*
|
8387 |
+
* @param bool $check_user Enforce checking if user have plugins activation privileges.
|
8388 |
+
*/
|
8389 |
+
function delete_network_account_event( $check_user = true ) {
|
8390 |
+
$this->_logger->entrance( 'slug = ' . $this->_slug );
|
8391 |
+
|
8392 |
+
if ( $check_user && ! $this->is_user_admin() ) {
|
8393 |
+
return;
|
8394 |
+
}
|
8395 |
+
|
8396 |
+
$this->do_action( 'before_network_account_delete' );
|
8397 |
+
|
8398 |
+
// Clear all admin notices.
|
8399 |
+
$this->_admin_notices->clear_all_sticky();
|
8400 |
+
|
8401 |
+
$this->_delete_plans( false, false );
|
8402 |
+
|
8403 |
+
$this->_delete_licenses( false );
|
8404 |
+
|
8405 |
+
// Delete add-ons related to plugin's account.
|
8406 |
+
$this->_delete_account_addons( false );
|
8407 |
+
|
8408 |
+
// @todo Delete plans and licenses of add-ons.
|
8409 |
+
|
8410 |
+
self::$_accounts->store( true );
|
8411 |
+
|
8412 |
+
/**
|
8413 |
+
* IMPORTANT:
|
8414 |
+
* Clear crons must be executed before clearing all storage.
|
8415 |
+
* Otherwise, the cron will not be cleared.
|
8416 |
+
*/
|
8417 |
+
$this->clear_sync_cron( true );
|
8418 |
+
$this->clear_install_sync_cron( true );
|
8419 |
+
|
8420 |
+
$sites = self::get_sites();
|
8421 |
+
|
8422 |
+
$install_ids = array();
|
8423 |
+
foreach ( $sites as $site ) {
|
8424 |
+
$blog_id = self::get_site_blog_id( $site );
|
8425 |
+
|
8426 |
+
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
8427 |
+
continue;
|
8428 |
+
}
|
8429 |
+
|
8430 |
+
$install_id = $this->_delete_site( true, $blog_id );
|
8431 |
+
|
8432 |
+
// Clear all storage data.
|
8433 |
+
$this->_storage->clear_all( true, array( 'connectivity_test' ), $blog_id );
|
8434 |
+
|
8435 |
+
if ( FS_Site::is_valid_id( $install_id ) ) {
|
8436 |
+
$install_ids[] = $install_id;
|
8437 |
+
}
|
8438 |
+
|
8439 |
+
switch_to_blog( $blog_id );
|
8440 |
+
|
8441 |
+
$this->do_action( 'after_account_delete' );
|
8442 |
+
|
8443 |
+
restore_current_blog();
|
8444 |
+
}
|
8445 |
+
|
8446 |
+
$this->_storage->clear_all( true, array(
|
8447 |
+
'connectivity_test',
|
8448 |
+
'is_on',
|
8449 |
+
), true );
|
8450 |
+
|
8451 |
+
// Send delete event.
|
8452 |
+
if ( ! empty( $install_ids ) ) {
|
8453 |
+
$result = $this->get_current_or_network_user_api_scope()->call( "/plugins/{$this->_module_id}/installs.json?ids=" . implode( ',', $install_ids ), 'delete' );
|
8454 |
+
}
|
8455 |
+
|
8456 |
+
$this->do_action( 'after_network_account_delete' );
|
8457 |
+
}
|
8458 |
+
|
8459 |
+
/**
|
8460 |
+
* Plugin deactivation hook.
|
8461 |
+
*
|
8462 |
+
* @author Vova Feldman (@svovaf)
|
8463 |
+
* @since 1.0.1
|
8464 |
+
*/
|
8465 |
+
function _deactivate_plugin_hook() {
|
8466 |
+
$this->_logger->entrance( 'slug = ' . $this->_slug );
|
8467 |
+
|
8468 |
+
if ( ! $this->is_user_admin() ) {
|
8469 |
+
return;
|
8470 |
+
}
|
8471 |
+
|
8472 |
+
$is_network_deactivation = fs_is_network_admin();
|
8473 |
+
$storage_keys_for_removal = array();
|
8474 |
+
|
8475 |
+
$this->_admin_notices->clear_all_sticky();
|
8476 |
+
|
8477 |
+
$storage_keys_for_removal[] = 'sticky_optin_added';
|
8478 |
+
if ( isset( $this->_storage->sticky_optin_added ) ) {
|
8479 |
+
unset( $this->_storage->sticky_optin_added );
|
8480 |
+
}
|
8481 |
+
|
8482 |
+
if ( ! isset( $this->_storage->is_plugin_new_install ) ) {
|
8483 |
+
// Remember that plugin was already installed.
|
8484 |
+
$this->_storage->is_plugin_new_install = false;
|
8485 |
+
}
|
8486 |
+
|
8487 |
+
// Hook to plugin uninstall.
|
8488 |
+
register_uninstall_hook( $this->_plugin_main_file_path, array( 'Freemius', '_uninstall_plugin_hook' ) );
|
8489 |
+
|
8490 |
+
$this->clear_module_main_file_cache();
|
8491 |
+
$this->clear_sync_cron( $this->_is_network_active );
|
8492 |
+
$this->clear_install_sync_cron();
|
8493 |
+
|
8494 |
+
if ( $this->is_registered() ) {
|
8495 |
+
if ( $this->is_premium() && ! $this->has_active_valid_license() ) {
|
8496 |
+
FS_Plugin_Updater::instance( $this )->delete_update_data();
|
8497 |
+
}
|
8498 |
+
|
8499 |
+
if ( $is_network_deactivation ) {
|
8500 |
+
// Send deactivation event.
|
8501 |
+
$this->sync_installs( array(
|
8502 |
+
'is_active' => false,
|
8503 |
+
) );
|
8504 |
+
} else {
|
8505 |
+
// Send deactivation event.
|
8506 |
+
$this->sync_install( array(
|
8507 |
+
'is_active' => false,
|
8508 |
+
) );
|
8509 |
+
}
|
8510 |
+
} else {
|
8511 |
+
if ( ! $this->has_api_connectivity() ) {
|
8512 |
+
// Reset connectivity test cache.
|
8513 |
+
unset( $this->_storage->connectivity_test );
|
8514 |
+
|
8515 |
+
$storage_keys_for_removal[] = 'connectivity_test';
|
8516 |
+
}
|
8517 |
+
}
|
8518 |
+
|
8519 |
+
if ( $is_network_deactivation ) {
|
8520 |
+
if ( isset( $this->_storage->sticky_optin_added_ms ) ) {
|
8521 |
+
unset( $this->_storage->sticky_optin_added_ms );
|
8522 |
+
}
|
8523 |
+
|
8524 |
+
if ( ! empty( $storage_keys_for_removal ) ) {
|
8525 |
+
$sites = self::get_sites();
|
8526 |
+
|
8527 |
+
foreach ( $sites as $site ) {
|
8528 |
+
$blog_id = self::get_site_blog_id( $site );
|
8529 |
+
|
8530 |
+
foreach ( $storage_keys_for_removal as $key ) {
|
8531 |
+
$this->_storage->remove( $key, false, $blog_id );
|
8532 |
+
}
|
8533 |
+
|
8534 |
+
$this->_storage->save( $blog_id );
|
8535 |
+
}
|
8536 |
+
}
|
8537 |
+
}
|
8538 |
+
|
8539 |
+
// Clear API cache on deactivation.
|
8540 |
+
FS_Api::clear_cache();
|
8541 |
+
|
8542 |
+
$this->remove_sdk_reference();
|
8543 |
+
}
|
8544 |
+
|
8545 |
+
/**
|
8546 |
+
* @author Vova Feldman (@svovaf)
|
8547 |
+
* @since 1.1.6
|
8548 |
+
*/
|
8549 |
+
private function remove_sdk_reference() {
|
8550 |
+
global $fs_active_plugins;
|
8551 |
+
|
8552 |
+
foreach ( $fs_active_plugins->plugins as $sdk_path => $data ) {
|
8553 |
+
if ( $this->_plugin_basename == $data->plugin_path ) {
|
8554 |
+
unset( $fs_active_plugins->plugins[ $sdk_path ] );
|
8555 |
+
break;
|
8556 |
+
}
|
8557 |
+
}
|
8558 |
+
|
8559 |
+
fs_fallback_to_newest_active_sdk();
|
8560 |
+
}
|
8561 |
+
|
8562 |
+
/**
|
8563 |
+
* @author Vova Feldman (@svovaf)
|
8564 |
+
* @since 1.1.3
|
8565 |
+
*
|
8566 |
+
* @param bool $is_anonymous
|
8567 |
+
* @param bool|int $network_or_blog_id Since 2.0.0
|
8568 |
+
*/
|
8569 |
+
private function set_anonymous_mode( $is_anonymous = true, $network_or_blog_id = 0 ) {
|
8570 |
+
// Store information regarding skip to try and opt-in the user
|
8571 |
+
// again in the future.
|
8572 |
+
$skip_info = array(
|
8573 |
+
'is' => $is_anonymous,
|
8574 |
+
'timestamp' => WP_FS__SCRIPT_START_TIME,
|
8575 |
+
'version' => $this->get_plugin_version(),
|
8576 |
+
);
|
8577 |
+
|
8578 |
+
if ( true === $network_or_blog_id ) {
|
8579 |
+
$this->_storage->is_anonymous_ms = $skip_info;
|
8580 |
+
} else {
|
8581 |
+
$this->_storage->store( 'is_anonymous', $skip_info, $network_or_blog_id );
|
8582 |
+
}
|
8583 |
+
|
8584 |
+
$this->network_upgrade_mode_completed();
|
8585 |
+
|
8586 |
+
// Update anonymous mode cache.
|
8587 |
+
$this->_is_anonymous = $is_anonymous;
|
8588 |
+
}
|
8589 |
+
|
8590 |
+
/**
|
8591 |
+
* @author Vova Feldman (@svovaf)
|
8592 |
+
* @since 2.0.0
|
8593 |
+
*
|
8594 |
+
* @param int $blog_id Site ID.
|
8595 |
+
* @param int $user_id User ID.
|
8596 |
+
* @param string $domain Site domain.
|
8597 |
+
* @param string $path Site path.
|
8598 |
+
* @param int $network_id Network ID. Only relevant on multi-network installations.
|
8599 |
+
* @param array $meta Metadata. Used to set initial site options.
|
8600 |
+
*
|
8601 |
+
* @uses Freemius::is_license_network_active() to check if the context license was network activated by the super-admin.
|
8602 |
+
* @uses Freemius::is_network_connected() to check if the super-admin network opted-in.
|
8603 |
+
* @uses Freemius::is_network_anonymous() to check if the super-admin network skipped.
|
8604 |
+
* @uses Freemius::is_network_delegated_connection() to check if the super-admin network delegated the connection to the site admins.
|
8605 |
+
*/
|
8606 |
+
function _after_new_blog_callback( $blog_id, $user_id, $domain, $path, $network_id, $meta ) {
|
8607 |
+
$this->_logger->entrance();
|
8608 |
+
|
8609 |
+
if ( $this->is_premium() &&
|
8610 |
+
$this->is_network_connected() &&
|
8611 |
+
is_object( $this->_license ) &&
|
8612 |
+
$this->_license->can_activate( FS_Site::is_localhost_by_address( $domain ) ) &&
|
8613 |
+
$this->is_license_network_active( $blog_id )
|
8614 |
+
) {
|
8615 |
+
/**
|
8616 |
+
* Running the premium version, the license was network activated, and the license can also be activated on the current site -> so try to opt-in with the license key.
|
8617 |
+
*/
|
8618 |
+
$current_blog_id = get_current_blog_id();
|
8619 |
+
$license = clone $this->_license;
|
8620 |
+
|
8621 |
+
$this->switch_to_blog( $blog_id );
|
8622 |
+
|
8623 |
+
// Opt-in with network user.
|
8624 |
+
$this->install_with_user(
|
8625 |
+
$this->get_network_user(),
|
8626 |
+
$license->secret_key,
|
8627 |
+
false,
|
8628 |
+
false,
|
8629 |
+
false
|
8630 |
+
);
|
8631 |
+
|
8632 |
+
if ( is_object( $this->_site ) ) {
|
8633 |
+
if ( $this->_site->license_id == $license->id ) {
|
8634 |
+
/**
|
8635 |
+
* If the license was activated successfully, sync the license data from the remote server.
|
8636 |
+
*/
|
8637 |
+
$this->_license = $license;
|
8638 |
+
$this->sync_site_license();
|
8639 |
+
}
|
8640 |
+
}
|
8641 |
+
|
8642 |
+
$this->switch_to_blog( $current_blog_id );
|
8643 |
+
|
8644 |
+
if ( is_object( $this->_site ) ) {
|
8645 |
+
// Already connected (with or without a license), so no need to continue.
|
8646 |
+
return;
|
8647 |
+
}
|
8648 |
+
}
|
8649 |
+
|
8650 |
+
if ( $this->is_network_anonymous() ) {
|
8651 |
+
/**
|
8652 |
+
* Opt-in was network skipped so automatically skip the opt-in for the new site.
|
8653 |
+
*/
|
8654 |
+
$this->skip_site_connection( $blog_id );
|
8655 |
+
} else if ( $this->is_network_delegated_connection() ) {
|
8656 |
+
/**
|
8657 |
+
* Opt-in was network delegated so automatically delegate the opt-in for the new site's admin.
|
8658 |
+
*/
|
8659 |
+
$this->delegate_site_connection( $blog_id );
|
8660 |
+
} else if ( $this->is_network_connected() ) {
|
8661 |
+
/**
|
8662 |
+
* Opt-in was network activated so automatically opt-in with the network user and new site admin.
|
8663 |
+
*/
|
8664 |
+
$current_blog_id = get_current_blog_id();
|
8665 |
+
|
8666 |
+
$this->switch_to_blog( $blog_id );
|
8667 |
+
|
8668 |
+
// Opt-in with network user.
|
8669 |
+
$this->install_with_user(
|
8670 |
+
$this->get_network_user(),
|
8671 |
+
false,
|
8672 |
+
false,
|
8673 |
+
false,
|
8674 |
+
false
|
8675 |
+
);
|
8676 |
+
|
8677 |
+
$this->switch_to_blog( $current_blog_id );
|
8678 |
+
} else {
|
8679 |
+
/**
|
8680 |
+
* If the super-admin mixed different options (connect, skip, delegated):
|
8681 |
+
* a) If at least one site connection was delegated, then automatically delegate connection.
|
8682 |
+
* b) Otherwise, it means that at least one site was skipped and at least one site was connected. For a simplified UX in the initial release of the multisite network integration, skip the connection for the newly created site. If the super-admin will want to opt-in they can still do that from the network level Account page.
|
8683 |
+
*/
|
8684 |
+
$has_delegated_site = false;
|
8685 |
+
|
8686 |
+
$sites = self::get_sites();
|
8687 |
+
foreach ( $sites as $site ) {
|
8688 |
+
$blog_id = self::get_site_blog_id( $site );
|
8689 |
+
|
8690 |
+
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
8691 |
+
$has_delegated_site = true;
|
8692 |
+
break;
|
8693 |
+
}
|
8694 |
+
}
|
8695 |
+
|
8696 |
+
if ( $has_delegated_site ) {
|
8697 |
+
$this->delegate_site_connection( $blog_id );
|
8698 |
+
} else {
|
8699 |
+
$this->skip_site_connection( $blog_id );
|
8700 |
+
}
|
8701 |
+
}
|
8702 |
+
}
|
8703 |
+
|
8704 |
+
/**
|
8705 |
+
* @author Vova Feldman (@svovaf)
|
8706 |
+
* @since 1.1.3
|
8707 |
+
*
|
8708 |
+
* @param bool|int $network_or_blog_id Since 2.0.0.
|
8709 |
+
*/
|
8710 |
+
private function reset_anonymous_mode( $network_or_blog_id = 0 ) {
|
8711 |
+
if ( true === $network_or_blog_id ) {
|
8712 |
+
unset( $this->_storage->is_anonymous_ms );
|
8713 |
+
} else {
|
8714 |
+
$this->_storage->remove( 'is_anonymous', true, $network_or_blog_id );
|
8715 |
+
}
|
8716 |
+
|
8717 |
+
/**
|
8718 |
+
* Ensure that this field is also "false", otherwise, if the current module's type is "theme" and the module
|
8719 |
+
* has no menus, the opt-in popup will not be shown immediately (in this case, the user will have to click
|
8720 |
+
* on the admin notice that contains the opt-in link in order to trigger the opt-in popup).
|
8721 |
+
*
|
8722 |
+
* @author Leo Fajardo (@leorw)
|
8723 |
+
* @since 1.2.2
|
8724 |
+
*/
|
8725 |
+
if ( ! $this->_is_network_active ||
|
8726 |
+
0 === $network_or_blog_id ||
|
8727 |
+
get_current_blog_id() == $network_or_blog_id ||
|
8728 |
+
( true === $network_or_blog_id && fs_is_network_admin() )
|
8729 |
+
) {
|
8730 |
+
$this->_is_anonymous = null;
|
8731 |
+
}
|
8732 |
+
}
|
8733 |
+
|
8734 |
+
/**
|
8735 |
+
* This is used to ensure that before redirecting to the opt-in page after resetting the anonymous mode or
|
8736 |
+
* deleting the account in the network level, the URL of the page to redirect to is correct.
|
8737 |
+
*
|
8738 |
+
* @author Leo Fajardo (@leorw)
|
8739 |
+
*
|
8740 |
+
* @since 2.1.3
|
8741 |
+
*/
|
8742 |
+
private function maybe_set_slug_and_network_menu_exists_flag() {
|
8743 |
+
if ( ! empty( $this->_dynamically_added_top_level_page_hook_name ) ) {
|
8744 |
+
$this->_menu->set_slug_and_network_menu_exists_flag( $this->_menu->has_menu() ?
|
8745 |
+
$this->_menu->get_slug() :
|
8746 |
+
$this->_slug
|
8747 |
+
);
|
8748 |
+
}
|
8749 |
+
}
|
8750 |
+
|
8751 |
+
/**
|
8752 |
+
* Clears the anonymous mode and redirects to the opt-in screen.
|
8753 |
+
*
|
8754 |
+
* @author Vova Feldman (@svovaf)
|
8755 |
+
* @since 1.1.7
|
8756 |
+
*/
|
8757 |
+
function connect_again() {
|
8758 |
+
if ( ! $this->is_anonymous() ) {
|
8759 |
+
return;
|
8760 |
+
}
|
8761 |
+
|
8762 |
+
$this->reset_anonymous_mode( fs_is_network_admin() );
|
8763 |
+
|
8764 |
+
$this->maybe_set_slug_and_network_menu_exists_flag();
|
8765 |
+
|
8766 |
+
fs_redirect( $this->get_activation_url() );
|
8767 |
+
}
|
8768 |
+
|
8769 |
+
/**
|
8770 |
+
* Skip account connect, and set anonymous mode.
|
8771 |
+
*
|
8772 |
+
* @author Vova Feldman (@svovaf)
|
8773 |
+
* @since 1.1.1
|
8774 |
+
*
|
8775 |
+
* @param array|null $sites Since 2.0.0. Specific sites.
|
8776 |
+
* @param bool $skip_all_network Since 2.0.0. If true, skip connection for all sites.
|
8777 |
+
*/
|
8778 |
+
function skip_connection( $sites = null, $skip_all_network = false ) {
|
8779 |
+
$this->_logger->entrance();
|
8780 |
+
|
8781 |
+
$this->_admin_notices->remove_sticky( 'connect_account' );
|
8782 |
+
|
8783 |
+
if ( $skip_all_network ) {
|
8784 |
+
$this->set_anonymous_mode( true, true );
|
8785 |
+
}
|
8786 |
+
|
8787 |
+
if ( ! $skip_all_network && empty( $sites ) ) {
|
8788 |
+
$this->skip_site_connection();
|
8789 |
+
} else {
|
8790 |
+
$uids = array();
|
8791 |
+
|
8792 |
+
if ( $skip_all_network ) {
|
8793 |
+
$this->set_anonymous_mode( true, true );
|
8794 |
+
|
8795 |
+
$sites = self::get_sites();
|
8796 |
+
foreach ( $sites as $site ) {
|
8797 |
+
$blog_id = self::get_site_blog_id( $site );
|
8798 |
+
$this->skip_site_connection( $blog_id, false );
|
8799 |
+
$uids[] = $this->get_anonymous_id( $blog_id );
|
8800 |
+
}
|
8801 |
+
} else if ( ! empty( $sites ) ) {
|
8802 |
+
foreach ( $sites as $site ) {
|
8803 |
+
$uids[] = $site['uid'];
|
8804 |
+
$this->skip_site_connection( $site['blog_id'], false );
|
8805 |
+
}
|
8806 |
+
}
|
8807 |
+
|
8808 |
+
// Send anonymous skip event.
|
8809 |
+
// No user identified info nor any tracking will be sent after the user skips the opt-in.
|
8810 |
+
$this->get_api_plugin_scope()->call( 'skip.json', 'put', array(
|
8811 |
+
'uids' => $uids,
|
8812 |
+
) );
|
8813 |
+
}
|
8814 |
+
|
8815 |
+
$this->network_upgrade_mode_completed();
|
8816 |
+
}
|
8817 |
+
|
8818 |
+
/**
|
8819 |
+
* Skip connection for specific site in the network.
|
8820 |
+
*
|
8821 |
+
* @author Vova Feldman (@svovaf)
|
8822 |
+
* @since 2.0.0
|
8823 |
+
*
|
8824 |
+
* @param int|null $blog_id
|
8825 |
+
* @param bool $send_skip
|
8826 |
+
*/
|
8827 |
+
private function skip_site_connection( $blog_id = null, $send_skip = true ) {
|
8828 |
+
$this->_logger->entrance();
|
8829 |
+
|
8830 |
+
$this->_admin_notices->remove_sticky( 'connect_account', $blog_id );
|
8831 |
+
|
8832 |
+
$this->set_anonymous_mode( true, $blog_id );
|
8833 |
+
|
8834 |
+
if ( $send_skip ) {
|
8835 |
+
$this->get_api_plugin_scope()->call( 'skip.json', 'put', array(
|
8836 |
+
'uids' => array( $this->get_anonymous_id( $blog_id ) ),
|
8837 |
+
) );
|
8838 |
+
}
|
8839 |
+
}
|
8840 |
+
|
8841 |
+
/**
|
8842 |
+
* Plugin version update hook.
|
8843 |
+
*
|
8844 |
+
* @author Vova Feldman (@svovaf)
|
8845 |
+
* @since 1.0.4
|
8846 |
+
*/
|
8847 |
+
private function update_plugin_version_event() {
|
8848 |
+
$this->_logger->entrance();
|
8849 |
+
|
8850 |
+
if ( ! $this->is_registered() ) {
|
8851 |
+
return;
|
8852 |
+
}
|
8853 |
+
|
8854 |
+
$this->schedule_install_sync();
|
8855 |
+
// $this->sync_install( array(), true );
|
8856 |
+
}
|
8857 |
+
|
8858 |
+
/**
|
8859 |
+
* Generate an MD5 signature of a plugins collection.
|
8860 |
+
* This helper methods used to identify changes in a plugins collection.
|
8861 |
+
*
|
8862 |
+
* @author Vova Feldman (@svovaf)
|
8863 |
+
* @since 2.0.0
|
8864 |
+
*
|
8865 |
+
* @param array [string]array $plugins
|
8866 |
+
*
|
8867 |
+
* @return string
|
8868 |
+
*/
|
8869 |
+
private function get_plugins_thumbprint( $plugins ) {
|
8870 |
+
ksort( $plugins );
|
8871 |
+
|
8872 |
+
$thumbprint = '';
|
8873 |
+
foreach ( $plugins as $basename => $data ) {
|
8874 |
+
$thumbprint .= $data['slug'] . ',' .
|
8875 |
+
$data['Version'] . ',' .
|
8876 |
+
( $data['is_active'] ? '1' : '0' ) . ';';
|
8877 |
+
}
|
8878 |
+
|
8879 |
+
return md5( $thumbprint );
|
8880 |
+
}
|
8881 |
+
|
8882 |
+
/**
|
8883 |
+
* Return a list of modified plugins since the last sync.
|
8884 |
+
*
|
8885 |
+
* Note:
|
8886 |
+
* There's no point to store a plugins counter since even if the number of
|
8887 |
+
* plugins didn't change, we still need to check if the versions are all the
|
8888 |
+
* same and the activity state is similar.
|
8889 |
+
*
|
8890 |
+
* @author Vova Feldman (@svovaf)
|
8891 |
+
* @since 1.1.8
|
8892 |
+
*
|
8893 |
+
* @return array|false
|
8894 |
+
*/
|
8895 |
+
private function get_plugins_data_for_api() {
|
8896 |
+
// Alias.
|
8897 |
+
$site_active_plugins_option_name = 'active_plugins';
|
8898 |
+
$network_plugins_option_name = 'all_plugins';
|
8899 |
+
|
8900 |
+
/**
|
8901 |
+
* Collection of all site level active plugins.
|
8902 |
+
*/
|
8903 |
+
$site_active_plugins_cache = self::$_accounts->get_option( $site_active_plugins_option_name );
|
8904 |
+
|
8905 |
+
if ( ! is_object( $site_active_plugins_cache ) ) {
|
8906 |
+
$site_active_plugins_cache = (object) array(
|
8907 |
+
'timestamp' => '',
|
8908 |
+
'md5' => '',
|
8909 |
+
'plugins' => array
|