Health Check - Version 1.4.4

Version Description

Download this release

Release Info

Developer Clorith
Plugin Icon 128x128 Health Check
Version 1.4.4
Comparing to
See all releases

Code changes from version 1.4.3 to 1.4.4

assets/css/health-check-troubleshooting-mode.css DELETED
@@ -1,197 +0,0 @@
1
- #health-check-dashboard-widget {
2
- display: grid;
3
- grid-gap: 2%;
4
- grid-template-columns: 100%;
5
- padding: 13px;
6
- background: #fff;
7
- /* Accordion styles */
8
- }
9
-
10
- @media all and (min-width: 783px) {
11
- #health-check-dashboard-widget {
12
- margin-top: 3rem;
13
- grid-template-columns: 49% 49%;
14
- }
15
- }
16
-
17
- #health-check-dashboard-widget h2 .green {
18
- color: #40860a;
19
- }
20
-
21
- #health-check-dashboard-widget .welcome-panel-content {
22
- max-width: initial;
23
- }
24
-
25
- #health-check-dashboard-widget #health-check-accordion-block-notices .no-notices p {
26
- color: #72777c;
27
- font-size: 1.2rem;
28
- }
29
-
30
- #health-check-dashboard-widget #health-check-accordion-block-notices .notice {
31
- color: #72777c;
32
- margin-left: 0;
33
- }
34
-
35
- #health-check-dashboard-widget #health-check-accordion-block-notices .notice p {
36
- font-size: 13px;
37
- }
38
-
39
- #health-check-dashboard-widget #health-check-accordion-block-notices .dismiss-notices {
40
- display: block;
41
- width: 100%;
42
- text-align: right;
43
- margin-right: 1rem;
44
- }
45
-
46
- #health-check-dashboard-widget .disable-troubleshooting-mode {
47
- margin-bottom: 1rem;
48
- }
49
-
50
- @media all and (min-width: 960px) {
51
- #health-check-dashboard-widget .disable-troubleshooting-mode {
52
- position: absolute;
53
- bottom: 1rem;
54
- right: 1rem;
55
- }
56
- }
57
-
58
- #health-check-dashboard-widget ul li {
59
- font-size: 13px;
60
- }
61
-
62
- @media all and (max-width: 870px) {
63
- #health-check-dashboard-widget ul li {
64
- display: inline-block;
65
- width: 100%;
66
- }
67
- }
68
-
69
- #health-check-dashboard-widget .about-description {
70
- margin: 1em 0;
71
- max-width: 700px;
72
- display: inline-block;
73
- }
74
-
75
- #health-check-dashboard-widget .about-description p {
76
- color: inherit;
77
- font-size: 16px;
78
- }
79
-
80
- #health-check-dashboard-widget .health-check-accordion {
81
- border: 1px solid #e2e4e7;
82
- }
83
-
84
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-heading {
85
- margin: 0;
86
- border-top: 1px solid #e2e4e7;
87
- font-size: inherit;
88
- line-height: inherit;
89
- font-weight: 600;
90
- color: inherit;
91
- }
92
-
93
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-heading:first-child {
94
- border-top: none;
95
- }
96
-
97
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger {
98
- background: #fff;
99
- border: 0;
100
- color: #32373c;
101
- cursor: pointer;
102
- display: block;
103
- font-weight: 400;
104
- margin: 0;
105
- padding: 1em 3.5em 1em 1.5em;
106
- position: relative;
107
- text-align: left;
108
- width: 100%;
109
- }
110
-
111
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger:hover, #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger:active {
112
- background: #f8f9f9;
113
- }
114
-
115
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger:focus {
116
- color: #191e23;
117
- border: none;
118
- box-shadow: none;
119
- outline-offset: -2px;
120
- outline: 1px dotted #555d66;
121
- }
122
-
123
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .title {
124
- display: inline-block;
125
- pointer-events: none;
126
- font-weight: 600;
127
- }
128
-
129
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .icon {
130
- border: solid #555d66;
131
- border-width: 0 2px 2px 0;
132
- height: 0.5rem;
133
- pointer-events: none;
134
- position: absolute;
135
- right: 1.5em;
136
- top: 50%;
137
- transform: translateY(-70%) rotate(45deg);
138
- width: 0.5rem;
139
- }
140
-
141
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .badge {
142
- float: right;
143
- padding: 0.1rem 0.5rem 0.15rem;
144
- color: #32373c;
145
- font-weight: 600;
146
- margin-left: 0.5rem;
147
- }
148
-
149
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .badge.blue {
150
- border: 1px solid #bfe7f3;
151
- }
152
-
153
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .badge.orange {
154
- border: 1px solid #ffb900;
155
- }
156
-
157
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .badge.red {
158
- border: 1px solid #dc3232;
159
- }
160
-
161
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .badge.green {
162
- border: 1px solid #46b450;
163
- }
164
-
165
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .badge.purple {
166
- border: 1px solid #826eb4;
167
- }
168
-
169
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger .badge.gray {
170
- border: 1px solid #ccd0d4;
171
- }
172
-
173
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-trigger[aria-expanded="true"] .icon {
174
- transform: translateY(-30%) rotate(-135deg);
175
- }
176
-
177
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-panel {
178
- margin: 0;
179
- padding: 1em 1.5em;
180
- background: #fff;
181
- }
182
-
183
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-panel > div {
184
- display: block;
185
- }
186
-
187
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-panel[hidden] {
188
- display: none;
189
- }
190
-
191
- #health-check-dashboard-widget .health-check-accordion .health-check-accordion-panel a .dashicons {
192
- text-decoration: none;
193
- }
194
-
195
- #health-check-dashboard-widget .health-check-accordion dl dd {
196
- margin: 0 0 0.5em 2em;
197
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/health-check.css CHANGED
@@ -1,651 +1,2 @@
1
- body {
2
- /* Accordion styles */
3
- }
4
 
5
- body.tools_page_health-check {
6
- /* Better position for the WordPress admin notices and update nag. */
7
- /* Info screen styles */
8
- /* Tools screen styles */
9
- /* Diff viewer styles */
10
- /* Site Status styles */
11
- }
12
-
13
- body.tools_page_health-check #wpcontent {
14
- padding-left: 0;
15
- }
16
-
17
- body.tools_page_health-check .notice {
18
- margin: 5px 20px 15px 22px;
19
- }
20
-
21
- body.tools_page_health-check .update-nag {
22
- margin-bottom: 20px;
23
- margin-left: 22px;
24
- }
25
-
26
- body.tools_page_health-check h2 {
27
- padding: 1rem 0;
28
- line-height: 1.4;
29
- }
30
-
31
- body.tools_page_health-check .wrap {
32
- margin-right: 0;
33
- margin-left: 0;
34
- }
35
-
36
- body.tools_page_health-check .wrap h2 {
37
- padding: 1rem 0.5rem;
38
- font-size: 1.3rem;
39
- font-weight: 600;
40
- font-family: inherit;
41
- }
42
-
43
- @media all and (min-width: 960px) {
44
- body.tools_page_health-check .wrap h2 {
45
- padding: 1rem 0;
46
- }
47
- }
48
-
49
- body.tools_page_health-check ul li,
50
- body.tools_page_health-check ol li {
51
- font-size: 13px;
52
- line-height: 1.5;
53
- }
54
-
55
- body.tools_page_health-check .wp-core-ui .button {
56
- font-size: 13px;
57
- }
58
-
59
- body.tools_page_health-check .health-check-header {
60
- text-align: center;
61
- margin: 0 0 1rem;
62
- background: #fff;
63
- border-bottom: 1px solid #e2e4e7;
64
- }
65
-
66
- body.tools_page_health-check .health-check-header .health-check-tabs-wrapper {
67
- /* IE 11 */
68
- display: -ms-inline-grid;
69
- -ms-grid-columns: 1fr 1fr 1fr 1fr;
70
- vertical-align: top;
71
- /* modern browsers */
72
- display: inline-grid;
73
- /* stylelint-disable-line declaration-block-no-duplicate-properties */
74
- grid-template-columns: 1fr 1fr 1fr 1fr;
75
- }
76
-
77
- body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab {
78
- display: block;
79
- /* IE 11 */
80
- text-decoration: none;
81
- color: inherit;
82
- padding: 0.5rem 1rem 1rem;
83
- margin: 0 1rem;
84
- transition: box-shadow 0.5s ease-in-out;
85
- }
86
-
87
- body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:nth-child(1) {
88
- -ms-grid-column: 1;
89
- /* IE 11 */
90
- }
91
-
92
- body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:nth-child(2) {
93
- -ms-grid-column: 2;
94
- /* IE 11 */
95
- }
96
-
97
- body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:nth-child(3) {
98
- -ms-grid-column: 3;
99
- /* IE 11 */
100
- }
101
-
102
- body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:nth-child(4) {
103
- -ms-grid-column: 4;
104
- /* IE 11 */
105
- }
106
-
107
- body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab.active {
108
- box-shadow: inset 0 -3px #007cba;
109
- font-weight: 600;
110
- }
111
-
112
- body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:focus {
113
- color: #191e23;
114
- outline: 1px solid #6c7781;
115
- box-shadow: none;
116
- }
117
-
118
- body.tools_page_health-check .health-check-body {
119
- max-width: 800px;
120
- margin: 0 auto;
121
- }
122
-
123
- body.tools_page_health-check .health-check-table {
124
- table-layout: fixed;
125
- }
126
-
127
- body.tools_page_health-check .health-check-table thead th,
128
- body.tools_page_health-check .health-check-table thead td {
129
- font-size: 13px;
130
- }
131
-
132
- body.tools_page_health-check .health-check-table thead th:first-child,
133
- body.tools_page_health-check .health-check-table thead td:first-child {
134
- width: 30%;
135
- }
136
-
137
- body.tools_page_health-check .health-check-table tbody td {
138
- width: 100%;
139
- box-sizing: border-box;
140
- display: block;
141
- font-size: 13px;
142
- word-wrap: break-word;
143
- }
144
-
145
- body.tools_page_health-check .health-check-table tbody td:first-child {
146
- width: 100%;
147
- padding-bottom: 0;
148
- font-weight: 600;
149
- }
150
-
151
- body.tools_page_health-check .health-check-table tbody td ul,
152
- body.tools_page_health-check .health-check-table tbody td ol {
153
- margin: 0;
154
- }
155
-
156
- body.tools_page_health-check .pass:before,
157
- body.tools_page_health-check .good:before {
158
- content: "\f147";
159
- display: inline-block;
160
- color: #46b450;
161
- font-family: dashicons;
162
- }
163
-
164
- body.tools_page_health-check .warning:before {
165
- content: "\f460";
166
- display: inline-block;
167
- color: #ffb900;
168
- font-family: dashicons;
169
- }
170
-
171
- body.tools_page_health-check .info:before {
172
- content: "\f348";
173
- display: inline-block;
174
- color: #00a0d2;
175
- font-family: dashicons;
176
- }
177
-
178
- body.tools_page_health-check .fail:before,
179
- body.tools_page_health-check .error:before {
180
- content: "\f335";
181
- display: inline-block;
182
- color: #dc3232;
183
- font-family: dashicons;
184
- }
185
-
186
- body.tools_page_health-check .spinner {
187
- float: none;
188
- }
189
-
190
- body.tools_page_health-check .site-health-copy-buttons {
191
- display: block;
192
- margin: 1rem 0;
193
- }
194
-
195
- body.tools_page_health-check .site-health-copy-buttons .copy-button-wrapper {
196
- margin: 0.5rem 0 1rem;
197
- }
198
-
199
- body.tools_page_health-check .site-health-copy-buttons .success {
200
- display: none;
201
- color: #40860a;
202
- height: 28px;
203
- line-height: 2.2;
204
- margin-left: 0.5rem;
205
- }
206
-
207
- body.tools_page_health-check .site-health-copy-buttons .success.visible {
208
- display: inline-block;
209
- }
210
-
211
- body.tools_page_health-check #health-check-debug {
212
- margin-bottom: 3rem;
213
- }
214
-
215
- body.tools_page_health-check .health-check-wp-paths-sizes.spinner {
216
- position: absolute;
217
- visibility: visible;
218
- float: none;
219
- margin: 0 4px;
220
- }
221
-
222
- body.tools_page_health-check .file-integrity-table thead th:first-child,
223
- body.tools_page_health-check .file-integrity-table thead td:first-child,
224
- body.tools_page_health-check .file-integrity-table tbody th:first-child,
225
- body.tools_page_health-check .file-integrity-table tbody td:first-child,
226
- body.tools_page_health-check .file-integrity-table tfoot th:first-child,
227
- body.tools_page_health-check .file-integrity-table tfoot td:first-child {
228
- text-align: center;
229
- width: 60px;
230
- }
231
-
232
- body.tools_page_health-check .tools-email-table {
233
- border: 0;
234
- box-shadow: none;
235
- }
236
-
237
- body.tools_page_health-check .tools-email-table td:first-child {
238
- width: 280px;
239
- }
240
-
241
- @media (max-width: 768px) {
242
- body.tools_page_health-check .tools-email-table td {
243
- display: block;
244
- }
245
- }
246
-
247
- body.tools_page_health-check .tools-email-table input {
248
- width: 100%;
249
- }
250
-
251
- body.tools_page_health-check .tools-email-table label {
252
- display: block;
253
- clear: both;
254
- }
255
-
256
- body.tools_page_health-check #health-check-mail-check,
257
- body.tools_page_health-check #health-check-file-integrity {
258
- margin-bottom: 15px;
259
- }
260
-
261
- body.tools_page_health-check #health-check-diff-modal {
262
- width: 100vw;
263
- height: 100%;
264
- position: fixed;
265
- top: 0;
266
- left: 0;
267
- background: rgba(0, 0, 0, 0.7);
268
- display: none;
269
- z-index: 99999;
270
- }
271
-
272
- body.tools_page_health-check #health-check-diff-modal #health-check-diff-modal-content {
273
- background: #fff;
274
- height: calc(100% - 120px);
275
- width: calc(100% - 120px);
276
- margin-top: 40px;
277
- margin-left: 40px;
278
- padding: 20px;
279
- display: block;
280
- }
281
-
282
- body.tools_page_health-check #health-check-diff-modal #health-check-diff-modal-diff {
283
- width: 100%;
284
- height: calc(100% - 80px);
285
- overflow-y: auto;
286
- display: block;
287
- position: relative;
288
- }
289
-
290
- body.tools_page_health-check #health-check-diff-modal #health-check-diff-modal-diff table.diff td:nth-child(2) {
291
- background: #f3f3f3;
292
- }
293
-
294
- body.tools_page_health-check #health-check-diff-modal-close-ref {
295
- position: relative;
296
- display: block;
297
- float: right;
298
- color: #000;
299
- text-decoration: none;
300
- }
301
-
302
- body.tools_page_health-check .site-health-issues-wrapper {
303
- margin-bottom: 3rem;
304
- margin-top: 2rem;
305
- }
306
-
307
- body.tools_page_health-check .site-health-issues-wrapper:first-of-type {
308
- margin-top: 3rem;
309
- }
310
-
311
- body.tools_page_health-check .site-status-has-issues {
312
- display: block;
313
- }
314
-
315
- body.tools_page_health-check .site-status-has-issues.hide {
316
- display: none;
317
- }
318
-
319
- body.tools_page_health-check h3 {
320
- padding: 0;
321
- font-weight: 400;
322
- }
323
-
324
- body.tools_page_health-check .site-health-view-more {
325
- text-align: center;
326
- }
327
-
328
- body.tools_page_health-check .issues-wrapper {
329
- margin-bottom: 5rem;
330
- }
331
-
332
- body.tools_page_health-check .site-status-all-clear {
333
- display: flex;
334
- flex-direction: column;
335
- align-items: center;
336
- justify-content: center;
337
- text-align: center;
338
- height: 100%;
339
- width: 100%;
340
- margin-top: 0;
341
- }
342
-
343
- @media all and (min-width: 784px) {
344
- body.tools_page_health-check .site-status-all-clear {
345
- margin: 5rem 0;
346
- }
347
- }
348
-
349
- body.tools_page_health-check .site-status-all-clear.hide {
350
- display: none;
351
- }
352
-
353
- body.tools_page_health-check .site-status-all-clear .dashicons {
354
- font-size: 150px;
355
- height: 130px;
356
- width: 150px;
357
- }
358
-
359
- body.tools_page_health-check .site-status-all-clear .encouragement {
360
- font-family: inherit;
361
- font-size: 1.5rem;
362
- font-weight: 600;
363
- }
364
-
365
- body.tools_page_health-check .site-status-all-clear p {
366
- margin: 0;
367
- }
368
-
369
- body.tools_page_health-check .site-health-view-passed {
370
- position: relative;
371
- padding-right: 40px;
372
- padding-left: 20px;
373
- }
374
-
375
- body.tools_page_health-check .site-health-view-passed .icon {
376
- border: solid #555d66;
377
- border-width: 0 2px 2px 0;
378
- height: 0.5rem;
379
- pointer-events: none;
380
- position: absolute;
381
- right: 1.5em;
382
- top: 50%;
383
- transform: translateY(-70%) rotate(45deg);
384
- width: 0.5rem;
385
- }
386
-
387
- body.tools_page_health-check .site-health-view-passed[aria-expanded="true"] .icon {
388
- transform: translateY(-30%) rotate(-135deg);
389
- }
390
-
391
- body .health-check-accordion {
392
- border: 1px solid #e2e4e7;
393
- }
394
-
395
- body .health-check-accordion .health-check-accordion-heading {
396
- margin: 0;
397
- border-top: 1px solid #e2e4e7;
398
- font-size: inherit;
399
- line-height: inherit;
400
- font-weight: 600;
401
- color: inherit;
402
- }
403
-
404
- body .health-check-accordion .health-check-accordion-heading:first-child {
405
- border-top: none;
406
- }
407
-
408
- body .health-check-accordion .health-check-accordion-trigger {
409
- background: #fff;
410
- border: 0;
411
- color: #32373c;
412
- cursor: pointer;
413
- display: block;
414
- font-weight: 400;
415
- margin: 0;
416
- padding: 1em 3.5em 1em 1.5em;
417
- position: relative;
418
- text-align: left;
419
- width: 100%;
420
- }
421
-
422
- body .health-check-accordion .health-check-accordion-trigger:hover, body .health-check-accordion .health-check-accordion-trigger:active {
423
- background: #f8f9f9;
424
- }
425
-
426
- body .health-check-accordion .health-check-accordion-trigger:focus {
427
- color: #191e23;
428
- border: none;
429
- box-shadow: none;
430
- outline-offset: -2px;
431
- outline: 1px dotted #555d66;
432
- }
433
-
434
- body .health-check-accordion .health-check-accordion-trigger .title {
435
- display: inline-block;
436
- pointer-events: none;
437
- font-weight: 600;
438
- }
439
-
440
- body .health-check-accordion .health-check-accordion-trigger .icon {
441
- border: solid #555d66;
442
- border-width: 0 2px 2px 0;
443
- height: 0.5rem;
444
- pointer-events: none;
445
- position: absolute;
446
- right: 1.5em;
447
- top: 50%;
448
- transform: translateY(-70%) rotate(45deg);
449
- width: 0.5rem;
450
- }
451
-
452
- body .health-check-accordion .health-check-accordion-trigger .badge {
453
- float: right;
454
- padding: 0.1rem 0.5rem 0.15rem;
455
- color: #32373c;
456
- font-weight: 600;
457
- margin-left: 0.5rem;
458
- }
459
-
460
- body .health-check-accordion .health-check-accordion-trigger .badge.blue {
461
- border: 1px solid #bfe7f3;
462
- }
463
-
464
- body .health-check-accordion .health-check-accordion-trigger .badge.orange {
465
- border: 1px solid #ffb900;
466
- }
467
-
468
- body .health-check-accordion .health-check-accordion-trigger .badge.red {
469
- border: 1px solid #dc3232;
470
- }
471
-
472
- body .health-check-accordion .health-check-accordion-trigger .badge.green {
473
- border: 1px solid #46b450;
474
- }
475
-
476
- body .health-check-accordion .health-check-accordion-trigger .badge.purple {
477
- border: 1px solid #826eb4;
478
- }
479
-
480
- body .health-check-accordion .health-check-accordion-trigger .badge.gray {
481
- border: 1px solid #ccd0d4;
482
- }
483
-
484
- body .health-check-accordion .health-check-accordion-trigger[aria-expanded="true"] .icon {
485
- transform: translateY(-30%) rotate(-135deg);
486
- }
487
-
488
- body .health-check-accordion .health-check-accordion-panel {
489
- margin: 0;
490
- padding: 1em 1.5em;
491
- background: #fff;
492
- }
493
-
494
- body .health-check-accordion .health-check-accordion-panel > div {
495
- display: block;
496
- }
497
-
498
- body .health-check-accordion .health-check-accordion-panel[hidden] {
499
- display: none;
500
- }
501
-
502
- body .health-check-accordion .health-check-accordion-panel a .dashicons {
503
- text-decoration: none;
504
- }
505
-
506
- body .health-check-accordion dl dd {
507
- margin: 0 0 0.5em 2em;
508
- }
509
-
510
- /* Modal styles */
511
- .health-check-modal {
512
- display: none;
513
- position: absolute;
514
- z-index: 1000;
515
- padding-top: 50px;
516
- left: 0;
517
- top: 0;
518
- width: 100%;
519
- height: 100%;
520
- overflow: auto;
521
- background-color: black;
522
- background-color: rgba(0, 0, 0, 0.4);
523
- }
524
-
525
- @media all and (min-width: 1024px) {
526
- .health-check-modal {
527
- padding-top: 100px;
528
- }
529
- }
530
-
531
- .health-check-modal.show {
532
- display: block;
533
- }
534
-
535
- .health-check-modal .modal-content {
536
- background-color: #fefefe;
537
- margin: auto;
538
- padding: 20px;
539
- border: 1px solid #888;
540
- width: 90%;
541
- }
542
-
543
- @media all and (min-width: 1024px) {
544
- .health-check-modal .modal-content {
545
- width: 30%;
546
- }
547
- }
548
-
549
- .health-check-modal .modal-content .modal-close {
550
- color: #aaa;
551
- float: right;
552
- font-size: 28px;
553
- font-weight: 600;
554
- cursor: pointer;
555
- }
556
-
557
- .health-check-modal .modal-content #dynamic-content {
558
- display: block;
559
- width: 100%;
560
- }
561
-
562
- .health-check-modal .modal-close:hover, .health-check-modal .modal-close:focus {
563
- color: #aaa;
564
- float: right;
565
- font-size: 28px;
566
- font-weight: 600;
567
- }
568
-
569
- /* Progress indicator styles */
570
- .health-check-title-section {
571
- display: flex;
572
- align-items: center;
573
- justify-content: center;
574
- clear: both;
575
- }
576
-
577
- .health-check-title-section h1 {
578
- display: inline-block;
579
- font-weight: 600;
580
- font-size: 23px;
581
- margin: 0 0.8rem 1rem;
582
- padding: 9px 0 4px;
583
- line-height: 1.3;
584
- font-family: inherit;
585
- }
586
-
587
- .health-check-title-section.site-health-progress-wrapper {
588
- margin-bottom: 1rem;
589
- }
590
-
591
- .health-check-title-section.site-health-progress-wrapper.loading .site-health-progress svg #bar {
592
- stroke-dashoffset: 0;
593
- stroke: #adc5d2;
594
- animation: loadingPulse 3s infinite ease-in-out;
595
- }
596
-
597
- @keyframes loadingPulse {
598
- 0% {
599
- stroke: #adc5d2;
600
- }
601
- 50% {
602
- stroke: #00a0d2;
603
- }
604
- 100% {
605
- stroke: #adc5d2;
606
- }
607
- }
608
-
609
- .health-check-title-section.site-health-progress-wrapper.green #bar {
610
- stroke: #46b450;
611
- }
612
-
613
- .health-check-title-section.site-health-progress-wrapper.green .site-health-progress-label {
614
- color: #46b450;
615
- }
616
-
617
- .health-check-title-section.site-health-progress-wrapper.orange #bar {
618
- stroke: #ffb900;
619
- }
620
-
621
- .health-check-title-section.site-health-progress-wrapper.orange .site-health-progress-label {
622
- color: #ffb900;
623
- }
624
-
625
- .health-check-title-section.site-health-progress-wrapper .site-health-progress {
626
- display: inline-block;
627
- height: 20px;
628
- width: 20px;
629
- margin: 0;
630
- border-radius: 100%;
631
- position: relative;
632
- font-weight: 600;
633
- font-size: 0.4rem;
634
- }
635
-
636
- .health-check-title-section.site-health-progress-wrapper .site-health-progress svg circle {
637
- stroke-dashoffset: 0;
638
- transition: stroke-dashoffset 1s linear;
639
- stroke: #ccc;
640
- stroke-width: 3em;
641
- }
642
-
643
- .health-check-title-section.site-health-progress-wrapper .site-health-progress svg #bar {
644
- stroke-dashoffset: 565;
645
- }
646
-
647
- .health-check-title-section.site-health-progress-wrapper .site-health-progress-label {
648
- font-weight: 600;
649
- line-height: 20px;
650
- margin-left: 0.3rem;
651
- }
1
+ body.tools_page_health-check #wpcontent{padding-left:0}body.tools_page_health-check .notice{margin:5px 20px 15px 22px}body.tools_page_health-check .update-nag{margin-bottom:20px;margin-left:22px}body.tools_page_health-check h2{padding:1rem 0;line-height:1.4}body.tools_page_health-check .wrap{margin-right:0;margin-left:0}body.tools_page_health-check .wrap h2{padding:1rem 0.5rem;font-size:1.3rem;font-weight:600;font-family:inherit}@media all and (min-width: 960px){body.tools_page_health-check .wrap h2{padding:1rem 0}}body.tools_page_health-check ul li,body.tools_page_health-check ol li{font-size:13px;line-height:1.5}body.tools_page_health-check .wp-core-ui .button{font-size:13px}body.tools_page_health-check .health-check-header{text-align:center;margin:0 0 1rem;background:#fff;border-bottom:1px solid #e2e4e7}body.tools_page_health-check .health-check-header .health-check-tabs-wrapper{display:-ms-inline-grid;-ms-grid-columns:1fr 1fr 1fr 1fr;vertical-align:top;display:inline-grid;grid-template-columns:1fr 1fr 1fr 1fr}body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab{display:block;text-decoration:none;color:inherit;padding:0.5rem 1rem 1rem;margin:0 1rem;transition:box-shadow 0.5s ease-in-out}body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:nth-child(1){-ms-grid-column:1}body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:nth-child(2){-ms-grid-column:2}body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:nth-child(3){-ms-grid-column:3}body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:nth-child(4){-ms-grid-column:4}body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab.active{box-shadow:inset 0 -3px #007cba;font-weight:600}body.tools_page_health-check .health-check-header .health-check-tabs-wrapper .health-check-tab:focus{color:#191e23;outline:1px solid #6c7781;box-shadow:none}body.tools_page_health-check .health-check-body{max-width:800px;margin:0 auto}body.tools_page_health-check .health-check-table{table-layout:fixed}body.tools_page_health-check .health-check-table thead th,body.tools_page_health-check .health-check-table thead td{font-size:13px}body.tools_page_health-check .health-check-table thead th:first-child,body.tools_page_health-check .health-check-table thead td:first-child{width:30%}body.tools_page_health-check .health-check-table tbody td{width:100%;box-sizing:border-box;display:block;font-size:13px;word-wrap:break-word}body.tools_page_health-check .health-check-table tbody td:first-child{width:100%;padding-bottom:0;font-weight:600}body.tools_page_health-check .health-check-table tbody td ul,body.tools_page_health-check .health-check-table tbody td ol{margin:0}body.tools_page_health-check .pass::before,body.tools_page_health-check .good::before{content:"\f147";display:inline-block;color:#46b450;font-family:dashicons}body.tools_page_health-check .warning::before{content:"\f460";display:inline-block;color:#ffb900;font-family:dashicons}body.tools_page_health-check .info::before{content:"\f348";display:inline-block;color:#00a0d2;font-family:dashicons}body.tools_page_health-check .fail::before,body.tools_page_health-check .error::before{content:"\f335";display:inline-block;color:#dc3232;font-family:dashicons}body.tools_page_health-check .spinner{float:none}body.tools_page_health-check .site-health-copy-buttons{display:block;margin:1rem 0}body.tools_page_health-check .site-health-copy-buttons .copy-button-wrapper{margin:0.5rem 0 1rem}body.tools_page_health-check .site-health-copy-buttons .success{display:none;color:#40860a;height:28px;line-height:2.2;margin-left:0.5rem}body.tools_page_health-check .site-health-copy-buttons .success.visible{display:inline-block}body.tools_page_health-check #health-check-debug{margin-bottom:3rem}body.tools_page_health-check .health-check-wp-paths-sizes.spinner{position:absolute;visibility:visible;float:none;margin:0 4px}body.tools_page_health-check .file-integrity-table thead th:first-child,body.tools_page_health-check .file-integrity-table thead td:first-child,body.tools_page_health-check .file-integrity-table tbody th:first-child,body.tools_page_health-check .file-integrity-table tbody td:first-child,body.tools_page_health-check .file-integrity-table tfoot th:first-child,body.tools_page_health-check .file-integrity-table tfoot td:first-child{text-align:center;width:60px}body.tools_page_health-check .tools-email-table{border:0;box-shadow:none}body.tools_page_health-check .tools-email-table td:first-child{width:280px}@media (max-width: 768px){body.tools_page_health-check .tools-email-table td{display:block}}body.tools_page_health-check .tools-email-table input{width:100%}body.tools_page_health-check .tools-email-table label{display:block;clear:both}body.tools_page_health-check #health-check-mail-check,body.tools_page_health-check #health-check-file-integrity{margin-bottom:15px}body.tools_page_health-check #health-check-diff-modal{width:100vw;height:100%;position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);display:none;z-index:99999}body.tools_page_health-check #health-check-diff-modal #health-check-diff-modal-content{background:#fff;height:calc(100% - 120px);width:calc(100% - 120px);margin-top:40px;margin-left:40px;padding:20px;display:block}body.tools_page_health-check #health-check-diff-modal #health-check-diff-modal-diff{width:100%;height:calc(100% - 80px);overflow-y:auto;display:block;position:relative}body.tools_page_health-check #health-check-diff-modal #health-check-diff-modal-diff table.diff td:nth-child(2){background:#f3f3f3}body.tools_page_health-check #health-check-diff-modal-close-ref{position:relative;display:block;float:right;color:#000;text-decoration:none}body.tools_page_health-check .site-health-issues-wrapper{margin-bottom:3rem;margin-top:2rem}body.tools_page_health-check .site-health-issues-wrapper:first-of-type{margin-top:3rem}body.tools_page_health-check .site-status-has-issues{display:block}body.tools_page_health-check .site-status-has-issues.hide{display:none}body.tools_page_health-check h3{padding:0;font-weight:400}body.tools_page_health-check .site-health-view-more{text-align:center}body.tools_page_health-check .issues-wrapper{margin-bottom:5rem}body.tools_page_health-check .site-status-all-clear{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;height:100%;width:100%;margin-top:0}@media all and (min-width: 784px){body.tools_page_health-check .site-status-all-clear{margin:5rem 0}}body.tools_page_health-check .site-status-all-clear.hide{display:none}body.tools_page_health-check .site-status-all-clear .dashicons{font-size:150px;height:130px;width:150px}body.tools_page_health-check .site-status-all-clear .encouragement{font-family:inherit;font-size:1.5rem;font-weight:600}body.tools_page_health-check .site-status-all-clear p{margin:0}body.tools_page_health-check .site-health-view-passed{position:relative;padding-right:40px;padding-left:20px}body.tools_page_health-check .site-health-view-passed .icon{border:solid #555d66;border-width:0 2px 2px 0;height:0.5rem;pointer-events:none;position:absolute;right:1.5em;top:50%;transform:translateY(-70%) rotate(45deg);width:0.5rem}body.tools_page_health-check .site-health-view-passed[aria-expanded="true"] .icon{transform:translateY(-30%) rotate(-135deg)}body .health-check-accordion{border:1px solid #e2e4e7}body .health-check-accordion .health-check-accordion-heading{margin:0;border-top:1px solid #e2e4e7;font-size:inherit;line-height:inherit;font-weight:600;color:inherit}body .health-check-accordion .health-check-accordion-heading:first-child{border-top:none}body .health-check-accordion .health-check-accordion-trigger{background:#fff;border:0;color:#32373c;cursor:pointer;display:block;font-weight:400;margin:0;padding:1em 3.5em 1em 1.5em;position:relative;text-align:left;width:100%}body .health-check-accordion .health-check-accordion-trigger:hover,body .health-check-accordion .health-check-accordion-trigger:active{background:#f8f9f9}body .health-check-accordion .health-check-accordion-trigger:focus{color:#191e23;border:none;box-shadow:none;outline-offset:-2px;outline:1px dotted #555d66}body .health-check-accordion .health-check-accordion-trigger .title{display:inline-block;pointer-events:none;font-weight:600}body .health-check-accordion .health-check-accordion-trigger .icon{border:solid #555d66;border-width:0 2px 2px 0;height:0.5rem;pointer-events:none;position:absolute;right:1.5em;top:50%;transform:translateY(-70%) rotate(45deg);width:0.5rem}body .health-check-accordion .health-check-accordion-trigger .badge{float:right;padding:0.1rem 0.5rem 0.15rem;color:#32373c;font-weight:600;margin-left:0.5rem}body .health-check-accordion .health-check-accordion-trigger .badge.blue{border:1px solid #bfe7f3}body .health-check-accordion .health-check-accordion-trigger .badge.orange{border:1px solid #ffb900}body .health-check-accordion .health-check-accordion-trigger .badge.red{border:1px solid #dc3232}body .health-check-accordion .health-check-accordion-trigger .badge.green{border:1px solid #46b450}body .health-check-accordion .health-check-accordion-trigger .badge.purple{border:1px solid #826eb4}body .health-check-accordion .health-check-accordion-trigger .badge.gray{border:1px solid #ccd0d4}body .health-check-accordion .health-check-accordion-trigger[aria-expanded="true"] .icon{transform:translateY(-30%) rotate(-135deg)}body .health-check-accordion .health-check-accordion-panel{margin:0;padding:1em 1.5em;background:#fff}body .health-check-accordion .health-check-accordion-panel>div{display:block}body .health-check-accordion .health-check-accordion-panel[hidden]{display:none}body .health-check-accordion .health-check-accordion-panel a .dashicons{text-decoration:none}body .health-check-accordion dl dd{margin:0 0 0.5em 2em}.health-check-modal{display:none;position:absolute;z-index:1000;padding-top:50px;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:#000;background-color:rgba(0,0,0,0.4)}@media all and (min-width: 1024px){.health-check-modal{padding-top:100px}}.health-check-modal.show{display:block}.health-check-modal .modal-content{background-color:#fefefe;margin:auto;padding:20px;border:1px solid #888;width:90%}@media all and (min-width: 1024px){.health-check-modal .modal-content{width:30%}}.health-check-modal .modal-content .modal-close{color:#aaa;float:right;font-size:28px;font-weight:600;cursor:pointer}.health-check-modal .modal-content #dynamic-content{display:block;width:100%}.health-check-modal .modal-close:hover,.health-check-modal .modal-close:focus{color:#aaa;float:right;font-size:28px;font-weight:600}.health-check-title-section{display:flex;align-items:center;justify-content:center;clear:both}.health-check-title-section h1{display:inline-block;font-weight:600;font-size:23px;margin:0 0.8rem 1rem;padding:9px 0 4px;line-height:1.3;font-family:inherit}.health-check-title-section.site-health-progress-wrapper{margin-bottom:1rem}.health-check-title-section.site-health-progress-wrapper.loading .site-health-progress svg #bar{stroke-dashoffset:0;stroke:#adc5d2;animation:loadingPulse 3s infinite ease-in-out}@keyframes loadingPulse{0%{stroke:#adc5d2}50%{stroke:#00a0d2}100%{stroke:#adc5d2}}.health-check-title-section.site-health-progress-wrapper.green #bar{stroke:#46b450}.health-check-title-section.site-health-progress-wrapper.green .site-health-progress-label{color:#46b450}.health-check-title-section.site-health-progress-wrapper.orange #bar{stroke:#ffb900}.health-check-title-section.site-health-progress-wrapper.orange .site-health-progress-label{color:#ffb900}.health-check-title-section.site-health-progress-wrapper .site-health-progress{display:inline-block;height:20px;width:20px;margin:0;border-radius:100%;position:relative;font-weight:600;font-size:0.4rem}.health-check-title-section.site-health-progress-wrapper .site-health-progress svg circle{stroke-dashoffset:0;transition:stroke-dashoffset 1s linear;stroke:#ccc;stroke-width:3em}.health-check-title-section.site-health-progress-wrapper .site-health-progress svg #bar{stroke-dashoffset:565}.health-check-title-section.site-health-progress-wrapper .site-health-progress-label{font-weight:600;line-height:20px;margin-left:0.3rem}#health-check-dashboard-widget{display:grid;grid-gap:2%;grid-template-columns:100%;padding:13px;background:#fff}@media all and (min-width: 783px){#health-check-dashboard-widget{margin-top:3rem;grid-template-columns:49% 49%}}#health-check-dashboard-widget h2 .green{color:#40860a}#health-check-dashboard-widget .welcome-panel-content{max-width:initial}#health-check-dashboard-widget #health-check-accordion-block-notices .no-notices p{color:#72777c;font-size:1.2rem}#health-check-dashboard-widget #health-check-accordion-block-notices .notice{color:#72777c;margin-left:0}#health-check-dashboard-widget #health-check-accordion-block-notices .notice p{font-size:13px}#health-check-dashboard-widget #health-check-accordion-block-notices .dismiss-notices{display:block;width:100%;text-align:right;margin-right:1rem}#health-check-dashboard-widget .disable-troubleshooting-mode{margin-bottom:1rem}@media all and (min-width: 960px){#health-check-dashboard-widget .disable-troubleshooting-mode{position:absolute;bottom:1rem;right:1rem}}#health-check-dashboard-widget ul li{font-size:13px}@media all and (max-width: 870px){#health-check-dashboard-widget ul li{display:inline-block;width:100%}}#health-check-dashboard-widget .about-description{margin:1em 0;max-width:700px;display:inline-block}#health-check-dashboard-widget .about-description p{color:inherit;font-size:16px}
 
 
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/javascript/health-check.js CHANGED
@@ -1,590 +1,8 @@
1
- jQuery( document ).ready( function( $ ) {
2
- $( '.health-check-accordion' ).on( 'click', '.health-check-accordion-trigger', function() {
3
- const isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
4
-
5
- if ( isExpanded ) {
6
- $( this ).attr( 'aria-expanded', 'false' );
7
- $( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', true );
8
- } else {
9
- $( this ).attr( 'aria-expanded', 'true' );
10
- $( '#' + $( this ).attr( 'aria-controls' ) ).attr( 'hidden', false );
11
- }
12
- } );
13
- } );
14
-
15
- /* global ClipboardJS, SiteHealth */
16
- jQuery( document ).ready( function( $ ) {
17
- let clipboard;
18
-
19
- if ( 'undefined' !== typeof ClipboardJS ) {
20
- clipboard = new ClipboardJS( '.site-health-copy-buttons .copy-button' );
21
-
22
- // Debug information copy section.
23
- clipboard.on( 'success', function( e ) {
24
- const $wrapper = $( e.trigger ).closest( 'div' );
25
-
26
- $( '.success', $wrapper ).addClass( 'visible' );
27
-
28
- wp.a11y.speak( SiteHealth.string.site_info_copied );
29
- } );
30
- }
31
- } );
32
-
33
- /* global ajaxurl, SiteHealth */
34
- jQuery( document ).ready( function( $ ) {
35
- const isDebugTab = $( '.health-check-debug-tab.active' ).length;
36
- const pathsSizesSection = $( '#health-check-accordion-block-wp-paths-sizes' );
37
-
38
- function getDirectorySizes() {
39
- const data = {
40
- action: 'health-check-get-sizes',
41
- _wpnonce: SiteHealth.nonce.site_status_result,
42
- };
43
-
44
- const timestamp = ( new Date().getTime() );
45
-
46
- // After 3 seconds announce that we're still waiting for directory sizes.
47
- const timeout = window.setTimeout( function() {
48
- wp.a11y.speak( SiteHealth.string.please_wait );
49
- }, 3000 );
50
-
51
- $.post( {
52
- type: 'POST',
53
- url: ajaxurl,
54
- data,
55
- dataType: 'json',
56
- } ).done( function( response ) {
57
- updateDirSizes( response.data || {} );
58
- } ).always( function() {
59
- let delay = ( new Date().getTime() ) - timestamp;
60
-
61
- $( '.health-check-wp-paths-sizes.spinner' ).css( 'visibility', 'hidden' );
62
-
63
- if ( delay > 3000 ) {
64
- // We have announced that we're waiting.
65
- // Announce that we're ready after giving at least 3 seconds for the first announcement
66
- // to be read out, or the two may collide.
67
- if ( delay > 6000 ) {
68
- delay = 0;
69
- } else {
70
- delay = 6500 - delay;
71
- }
72
-
73
- window.setTimeout( function() {
74
- wp.a11y.speak( SiteHealth.string.site_health_complete );
75
- }, delay );
76
- } else {
77
- // Cancel the announcement.
78
- window.clearTimeout( timeout );
79
- }
80
-
81
- $( document ).trigger( 'site-health-info-dirsizes-done' );
82
- } );
83
- }
84
-
85
- function updateDirSizes( data ) {
86
- const copyButton = $( 'button.button.copy-button' );
87
- let clipdoardText = copyButton.attr( 'data-clipboard-text' );
88
-
89
- $.each( data, function( name, value ) {
90
- const text = value.debug || value.size;
91
-
92
- if ( 'undefined' !== typeof text ) {
93
- clipdoardText = clipdoardText.replace( name + ': loading...', name + ': ' + text );
94
- }
95
- } );
96
-
97
- copyButton.attr( 'data-clipboard-text', clipdoardText );
98
-
99
- pathsSizesSection.find( 'td[class]' ).each( function( i, element ) {
100
- const td = $( element );
101
- const name = td.attr( 'class' );
102
-
103
- if ( data.hasOwnProperty( name ) && data[ name ].size ) {
104
- td.text( data[ name ].size );
105
- }
106
- } );
107
- }
108
-
109
- if ( isDebugTab ) {
110
- if ( pathsSizesSection.length ) {
111
- getDirectorySizes();
112
- }
113
- }
114
- } );
115
-
116
- /* global ajaxurl */
117
- jQuery( document ).ready( function( $ ) {
118
- function healthCheckFailureModal( markup, action, parent ) {
119
- $( '#dynamic-content' ).html( markup );
120
- $( '.health-check-modal' ).data( 'modal-action', action ).data( 'parent-field', parent ).show();
121
- }
122
-
123
- function healthCheckFailureModalClose( modal ) {
124
- modal.hide();
125
- }
126
-
127
- $( '.modal-close' ).click( function( e ) {
128
- e.preventDefault();
129
- healthCheckFailureModalClose( $( this ).closest( '.health-check-modal' ) );
130
- } );
131
-
132
- $( '.health-check-modal' ).on( 'submit', 'form', function( e ) {
133
- const data = $( this ).serializeArray(),
134
- modal = $( this ).closest( '.health-check-modal' );
135
-
136
- e.preventDefault();
137
-
138
- $.post(
139
- ajaxurl,
140
- data,
141
- function( response ) {
142
- if ( true === response.success ) {
143
- $( modal.data( 'parent-field' ) ).append( response.data.message );
144
- } else {
145
- healthCheckFailureModal( response.data.message, data.action, modal.data( 'parent-field' ) );
146
- }
147
- }
148
- );
149
-
150
- healthCheckFailureModalClose( modal );
151
- } );
152
- } );
153
-
154
- /* global SiteHealth, ajaxurl, healthCheckFailureModal */
155
- jQuery( document ).ready( function( $ ) {
156
- function testDefaultTheme() {
157
- const $parent = $( '.individual-loopback-test-status', '#test-single-no-theme' ),
158
- data = {
159
- action: 'health-check-loopback-default-theme',
160
- _wpnonce: SiteHealth.nonce.loopback_default_theme,
161
- };
162
-
163
- $.post(
164
- ajaxurl,
165
- data,
166
- function( response ) {
167
- if ( true === response.success ) {
168
- $parent.html( response.data.message );
169
- } else {
170
- healthCheckFailureModal( response.data, data.action, $parent );
171
- }
172
- },
173
- 'json'
174
- );
175
- }
176
-
177
- function testSinglePlugin() {
178
- const $testLines = $( '.not-tested', '#loopback-individual-plugins-list' );
179
-
180
- if ( $testLines.length < 1 ) {
181
- testDefaultTheme();
182
- return null;
183
- }
184
-
185
- const $testLine = $testLines.first();
186
- const data = {
187
- action: 'health-check-loopback-individual-plugins',
188
- plugin: $testLine.data( 'test-plugin' ),
189
- _wpnonce: SiteHealth.nonce.loopback_individual_plugins,
190
- };
191
-
192
- const $parentField = $( '.individual-loopback-test-status', $testLine );
193
-
194
- $parentField.html( SiteHealth.string.running_tests );
195
-
196
- $.post(
197
- ajaxurl,
198
- data,
199
- function( response ) {
200
- if ( true === response.success ) {
201
- $testLine.removeClass( 'not-tested' );
202
- $parentField.html( response.data.message );
203
- testSinglePlugin();
204
- } else {
205
- healthCheckFailureModal( response.data, data.action, $parentField );
206
- }
207
- },
208
- 'json'
209
- );
210
- }
211
-
212
- $( '.dashboard_page_health-check' ).on( 'click', '#loopback-no-plugins', function( e ) {
213
- const $trigger = $( this ),
214
- $parent = $( this ).closest( 'p' ),
215
- data = {
216
- action: 'health-check-loopback-no-plugins',
217
- _wpnonce: SiteHealth.nonce.loopback_no_plugins,
218
- };
219
-
220
- e.preventDefault();
221
-
222
- $( this ).html( '<span class="spinner" style="visibility: visible;"></span> ' + SiteHealth.string.please_wait );
223
-
224
- $.post(
225
- ajaxurl,
226
- data,
227
- function( response ) {
228
- $trigger.remove();
229
- if ( true === response.success ) {
230
- $parent.append( response.data.message );
231
- } else {
232
- healthCheckFailureModal( response.data, data.action, $parent );
233
- }
234
- },
235
- 'json'
236
- );
237
- } ).on( 'click', '#loopback-individual-plugins', function( e ) {
238
- e.preventDefault();
239
-
240
- $( this ).remove();
241
-
242
- testSinglePlugin();
243
- } );
244
- } );
245
-
246
- /* global ajaxurl, SiteHealth */
247
- jQuery( document ).ready( function( $ ) {
248
- let data;
249
- const isDebugTab = $( '.health-check-debug-tab.active' ).length;
250
-
251
- $( '.site-health-view-passed' ).on( 'click', function() {
252
- const goodIssuesWrapper = $( '#health-check-issues-good' );
253
-
254
- goodIssuesWrapper.toggleClass( 'hidden' );
255
- $( this ).attr( 'aria-expanded', ! goodIssuesWrapper.hasClass( 'hidden' ) );
256
- } );
257
-
258
- function AppendIssue( issue ) {
259
- if ( typeof issue === 'undefined' || typeof issue.status === 'undefined' ) {
260
- return;
261
- }
262
-
263
- const template = wp.template( 'health-check-issue' ),
264
- issueWrapper = $( '#health-check-issues-' + issue.status );
265
-
266
- let heading;
267
-
268
- SiteHealth.site_status.issues[ issue.status ]++;
269
-
270
- const count = SiteHealth.site_status.issues[ issue.status ];
271
-
272
- if ( 'critical' === issue.status ) {
273
- if ( count <= 1 ) {
274
- heading = SiteHealth.string.site_info_heading_critical_single.replace( '%s', '<span class="issue-count">' + count + '</span>' );
275
- } else {
276
- heading = SiteHealth.string.site_info_heading_critical_plural.replace( '%s', '<span class="issue-count">' + count + '</span>' );
277
- }
278
- } else if ( 'recommended' === issue.status ) {
279
- if ( count <= 1 ) {
280
- heading = SiteHealth.string.site_info_heading_recommended_single.replace( '%s', '<span class="issue-count">' + count + '</span>' );
281
- } else {
282
- heading = SiteHealth.string.site_info_heading_recommended_plural.replace( '%s', '<span class="issue-count">' + count + '</span>' );
283
- }
284
- } else if ( 'good' === issue.status ) {
285
- if ( count <= 1 ) {
286
- heading = SiteHealth.string.site_info_heading_good_single.replace( '%s', '<span class="issue-count">' + count + '</span>' );
287
- } else {
288
- heading = SiteHealth.string.site_info_heading_good_plural.replace( '%s', '<span class="issue-count">' + count + '</span>' );
289
- }
290
- }
291
-
292
- if ( heading ) {
293
- $( '.site-health-issue-count-title', issueWrapper ).html( heading );
294
- }
295
-
296
- $( '.issues', '#health-check-issues-' + issue.status ).append( template( issue ) );
297
- }
298
-
299
- function RecalculateProgression() {
300
- const $progress = $( '.site-health-progress' );
301
- const $wrapper = $progress.closest( '.site-health-progress-wrapper' );
302
- const $progressLabel = $( '.site-health-progress-label', $wrapper );
303
- const $circle = $( '.site-health-progress svg #bar' );
304
- const totalTests = parseInt( SiteHealth.site_status.issues.good, 0 ) + parseInt( SiteHealth.site_status.issues.recommended, 0 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 );
305
- const failedTests = ( parseInt( SiteHealth.site_status.issues.recommended, 0 ) * 0.5 ) + ( parseInt( SiteHealth.site_status.issues.critical, 0 ) * 1.5 );
306
- let val = 100 - Math.ceil( ( failedTests / totalTests ) * 100 );
307
-
308
- if ( 0 === totalTests ) {
309
- $progress.addClass( 'hidden' );
310
- return;
311
- }
312
-
313
- $wrapper.removeClass( 'loading' );
314
-
315
- const r = $circle.attr( 'r' );
316
- const c = Math.PI * ( r * 2 );
317
-
318
- if ( 0 > val ) {
319
- val = 0;
320
- }
321
- if ( 100 < val ) {
322
- val = 100;
323
- }
324
-
325
- const pct = ( ( 100 - val ) / 100 ) * c;
326
-
327
- $circle.css( { strokeDashoffset: pct } );
328
-
329
- if ( 1 > parseInt( SiteHealth.site_status.issues.critical, 0 ) ) {
330
- $( '#health-check-issues-critical' ).addClass( 'hidden' );
331
- }
332
-
333
- if ( 1 > parseInt( SiteHealth.site_status.issues.recommended, 0 ) ) {
334
- $( '#health-check-issues-recommended' ).addClass( 'hidden' );
335
- }
336
-
337
- if ( ! isDebugTab ) {
338
- $.post(
339
- ajaxurl,
340
- {
341
- action: 'health-check-site-status-result',
342
- _wpnonce: SiteHealth.nonce.site_status_result,
343
- counts: SiteHealth.site_status.issues,
344
- }
345
- );
346
- }
347
-
348
- if ( 80 <= val && 0 === parseInt( SiteHealth.site_status.issues.critical, 0 ) ) {
349
- $wrapper.addClass( 'green' ).removeClass( 'orange' );
350
-
351
- $progressLabel.text( SiteHealth.string.site_health_complete_pass );
352
- wp.a11y.speak( SiteHealth.string.site_health_complete_pass_sr );
353
- } else {
354
- $wrapper.addClass( 'orange' ).removeClass( 'green' );
355
-
356
- $progressLabel.text( SiteHealth.string.site_health_complete_fail );
357
- wp.a11y.speak( SiteHealth.string.site_health_complete_fail_sr );
358
- }
359
-
360
- if ( 100 === val ) {
361
- $( '.site-status-all-clear' ).removeClass( 'hide' );
362
- $( '.site-status-has-issues' ).addClass( 'hide' );
363
- }
364
- }
365
-
366
- function maybeRunNextAsyncTest() {
367
- let doCalculation = true;
368
-
369
- if ( 1 <= SiteHealth.site_status.async.length ) {
370
- $.each( SiteHealth.site_status.async, function() {
371
- data = {
372
- action: 'health-check-site-status',
373
- feature: this.test,
374
- _wpnonce: SiteHealth.nonce.site_status,
375
- };
376
-
377
- if ( this.completed ) {
378
- return true;
379
- }
380
-
381
- doCalculation = false;
382
-
383
- this.completed = true;
384
-
385
- $.post(
386
- ajaxurl,
387
- data,
388
- function( response ) {
389
- if ( typeof wp.hooks !== 'undefined' ) {
390
- AppendIssue( wp.hooks.applyFilters( 'site_status_test_result', response.data ) );
391
- } else {
392
- AppendIssue( response.data );
393
- }
394
- maybeRunNextAsyncTest();
395
- }
396
- );
397
-
398
- return false;
399
- } );
400
- }
401
-
402
- if ( doCalculation ) {
403
- RecalculateProgression();
404
- }
405
- }
406
-
407
- if ( 'undefined' !== typeof SiteHealth ) {
408
- if ( 0 === SiteHealth.site_status.direct.length && 0 === SiteHealth.site_status.async.length ) {
409
- RecalculateProgression();
410
- } else {
411
- SiteHealth.site_status.issues = {
412
- good: 0,
413
- recommended: 0,
414
- critical: 0,
415
- };
416
- }
417
-
418
- if ( 0 < SiteHealth.site_status.direct.length ) {
419
- $.each( SiteHealth.site_status.direct, function() {
420
- AppendIssue( this );
421
- } );
422
- }
423
-
424
- if ( 0 < SiteHealth.site_status.async.length ) {
425
- data = {
426
- action: 'health-check-site-status',
427
- feature: SiteHealth.site_status.async[ 0 ].test,
428
- _wpnonce: SiteHealth.nonce.site_status,
429
- };
430
-
431
- SiteHealth.site_status.async[ 0 ].completed = true;
432
-
433
- $.post(
434
- ajaxurl,
435
- data,
436
- function( response ) {
437
- AppendIssue( response.data );
438
- maybeRunNextAsyncTest();
439
- }
440
- );
441
- } else {
442
- RecalculateProgression();
443
- }
444
- }
445
- } );
446
-
447
- jQuery( document ).ready( function( $ ) {
448
- $( '.show-remaining' ).click( function() {
449
- $( '.hidden', $( this ).closest( 'ul' ) ).removeClass( 'hidden' );
450
- } );
451
- } );
452
-
453
- /* global ajaxurl, SiteHealth */
454
- jQuery( document ).ready( function( $ ) {
455
- $( '#health-check-file-integrity' ).submit( function( e ) {
456
- const data = {
457
- action: 'health-check-files-integrity-check',
458
- _wpnonce: SiteHealth.nonce.files_integrity_check,
459
- };
460
-
461
- e.preventDefault();
462
-
463
- $( '#tools-file-integrity-response-holder' ).html( '<span class="spinner"></span>' );
464
- $( '#tools-file-integrity-response-holder .spinner' ).addClass( 'is-active' );
465
-
466
- $.post(
467
- ajaxurl,
468
- data,
469
- function( response ) {
470
- $( '#tools-file-integrity-response-holder .spinner' ).removeClass( 'is-active' );
471
- $( '#tools-file-integrity-response-holder' ).parent().css( 'height', 'auto' );
472
- $( '#tools-file-integrity-response-holder' ).html( response.data.message );
473
- }
474
- );
475
- } );
476
-
477
- $( '#tools-file-integrity-response-holder' ).on( 'click', 'a[href="#health-check-diff"]', function( e ) {
478
- const file = $( this ).data( 'file' );
479
-
480
- e.preventDefault();
481
-
482
- $( '#health-check-diff-modal' ).toggle();
483
- $( '#health-check-diff-modal #health-check-diff-modal-content .spinner' ).addClass( 'is-active' );
484
-
485
- const data = {
486
- action: 'health-check-view-file-diff',
487
- file,
488
- _wpnonce: SiteHealth.nonce.view_file_diff,
489
- };
490
-
491
- $.post(
492
- ajaxurl,
493
- data,
494
- function( response ) {
495
- $( '#health-check-diff-modal #health-check-diff-modal-diff' ).html( response.data.message );
496
- $( '#health-check-diff-modal #health-check-diff-modal-content h3' ).html( file );
497
- $( '#health-check-diff-modal #health-check-diff-modal-content .spinner' ).removeClass( 'is-active' );
498
- }
499
- );
500
- } );
501
- } );
502
-
503
- jQuery( document ).ready( function( $ ) {
504
- $( '#health-check-diff-modal' ).on( 'click', 'a[href="#health-check-diff-modal-close"]', function( e ) {
505
- e.preventDefault();
506
- $( '#health-check-diff-modal' ).toggle();
507
- $( '#health-check-diff-modal #health-check-diff-modal-diff' ).html( '' );
508
- $( '#health-check-diff-modal #health-check-diff-modal-content h3' ).html( '' );
509
- } );
510
-
511
- $( document ).keyup( function( e ) {
512
- if ( 27 === e.which ) {
513
- $( '#health-check-diff-modal' ).css( 'display', 'none' );
514
- $( '#health-check-diff-modal #health-check-diff-modal-diff' ).html( '' );
515
- $( '#health-check-diff-modal #health-check-diff-modal-content h3' ).html( '' );
516
- }
517
- } );
518
- } );
519
-
520
- /* global ajaxurl, SiteHealth */
521
- jQuery( document ).ready( function( $ ) {
522
- $( '#health-check-mail-check' ).submit( function( e ) {
523
- const email = $( '#health-check-mail-check #email' ).val(),
524
- emailMessage = $( '#health-check-mail-check #email_message' ).val();
525
-
526
- e.preventDefault();
527
-
528
- $( '#tools-mail-check-response-holder' ).html( '<span class="spinner"></span>' );
529
- $( '#tools-mail-check-response-holder .spinner' ).addClass( 'is-active' );
530
-
531
- const data = {
532
- action: 'health-check-mail-check',
533
- email,
534
- email_message: emailMessage,
535
- _wpnonce: SiteHealth.nonce.mail_check,
536
- };
537
-
538
- $.post(
539
- ajaxurl,
540
- data,
541
- function( response ) {
542
- $( '#tools-mail-check-response-holder .spinner' ).removeClass( 'is-active' );
543
- $( '#tools-mail-check-response-holder' ).parent().css( 'height', 'auto' );
544
- $( '#tools-mail-check-response-holder' ).html( response.data.message );
545
- }
546
- );
547
- } );
548
- } );
549
-
550
- /* global ajaxurl, SiteHealth */
551
- jQuery( document ).ready( function( $ ) {
552
- $( '#health-check-tool-plugin-compat' ).click( function() {
553
- $( 'tr', '#health-check-tool-plugin-compat-list' ).data( 'plugin-checked', false );
554
- $( '.spinner', '#health-check-tool-plugin-compat-list' ).addClass( 'is-active' );
555
-
556
- $( this ).attr( 'disabled', true );
557
-
558
- HealthCheckToolsPluginCompatTest();
559
- } );
560
-
561
- function HealthCheckToolsPluginCompatTest() {
562
- const $plugins = $( '[data-plugin-checked="false"]', '#health-check-tool-plugin-compat-list' );
563
-
564
- if ( $plugins.length <= 0 ) {
565
- return;
566
- }
567
-
568
- const $nextPlugin = $( $plugins[ 0 ] );
569
-
570
- $nextPlugin.attr( 'data-plugin-checked', 'true' );
571
-
572
- const data = {
573
- action: 'health-check-tools-plugin-compat',
574
- slug: $nextPlugin.data( 'plugin-slug' ),
575
- version: $nextPlugin.data( 'plugin-version' ),
576
- _wpnonce: SiteHealth.nonce.tools_plugin_compat,
577
- };
578
-
579
- $.post(
580
- ajaxurl,
581
- data,
582
- function( response ) {
583
- $( '.spinner', $nextPlugin ).removeClass( 'is-active' );
584
- $( '.supported-version', $nextPlugin ).append( response.data.version );
585
-
586
- HealthCheckToolsPluginCompatTest();
587
- }
588
- );
589
- }
590
- } );
1
+ !function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=13)}([function(e,t,n){},function(e,t,n){
2
+ /*!
3
+ * clipboard.js v2.0.6
4
+ * https://clipboardjs.com/
5
+ *
6
+ * Licensed MIT © Zeno Rocha
7
+ */
8
+ var i;i=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var a=t[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(i,a,function(t){return e[t]}.bind(null,a));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),a=document.createRange();a.selectNodeContents(e),i.removeAllRanges(),i.addRange(a),t=i.toString()}return t}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function a(){i.off(e,a),t.apply(n,arguments)}return a._=t,this.on(e,a,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,a=n.length;i<a;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],a=[];if(i&&t)for(var o=0,s=i.length;o<s;o++)i[o].fn!==t&&i[o].fn._!==t&&a.push(i[o]);return a.length?n[e]=a:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var i=n(3),a=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return a(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var i=n(5);function a(e,t,n,i,a){var s=o.apply(this,arguments);return e.addEventListener(n,s,a),{destroy:function(){e.removeEventListener(n,s,a)}}}function o(e,t,n,a){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&a.call(e,n)}}e.exports=function(e,t,n,i,o){return"function"==typeof e.addEventListener?a.apply(null,arguments):"function"==typeof n?a.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return a(e,t,n,i,o)})))}},function(e,t){if("undefined"!=typeof Element&&!Element.prototype.matches){var n=Element.prototype;n.matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var i=n(0),a=n.n(i),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),r=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.resolveOptions(t),this.initSelection()}return s(e,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=a()(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=a()(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":o(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}(),c=n(1),l=n.n(c),u=n(2),h=n.n(u),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),p=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return i.resolveOptions(n),i.listenClick(e),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),f(t,[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===d(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=h()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new r({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return m("action",e)}},{key:"defaultTarget",value:function(e){var t=m("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return m("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}]),t}(l.a);function m(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}t.default=p}]).default},e.exports=i()},function(e,t){jQuery(document).ready((function(e){var t,n,i,a=e(".health-check-debug-tab.active").length,o=e("#health-check-accordion-block-wp-paths-sizes");a&&o.length&&(t={action:"health-check-get-sizes",_wpnonce:SiteHealth.nonce.site_status_result},n=(new Date).getTime(),i=window.setTimeout((function(){wp.a11y.speak(SiteHealth.string.please_wait)}),3e3),e.post({type:"POST",url:ajaxurl,data:t,dataType:"json"}).done((function(t){!function(t){var n=e("button.button.copy-button"),i=n.attr("data-clipboard-text");e.each(t,(function(e,t){var n=t.debug||t.size;void 0!==n&&(i=i.replace(e+": loading...",e+": "+n))})),n.attr("data-clipboard-text",i),o.find("td[class]").each((function(n,i){var a=e(i),o=a.attr("class");t.hasOwnProperty(o)&&t[o].size&&a.text(t[o].size)}))}(t.data||{})})).always((function(){var t=(new Date).getTime()-n;e(".health-check-wp-paths-sizes.spinner").css("visibility","hidden"),t>3e3?(t=t>6e3?0:6500-t,window.setTimeout((function(){wp.a11y.speak(SiteHealth.string.site_health_complete)}),t)):window.clearTimeout(i),e(document).trigger("site-health-info-dirsizes-done")})))}))},function(e,t){jQuery(document).ready((function(e){e(".health-check-accordion").on("click",".health-check-accordion-trigger",(function(){"true"===e(this).attr("aria-expanded")?(e(this).attr("aria-expanded","false"),e("#"+e(this).attr("aria-controls")).attr("hidden",!0)):(e(this).attr("aria-expanded","true"),e("#"+e(this).attr("aria-controls")).attr("hidden",!1))}))}))},function(e,t){jQuery(document).ready((function(e){function t(e){e.hide()}e(".modal-close").click((function(n){n.preventDefault(),t(e(this).closest(".health-check-modal"))})),e(".health-check-modal").on("submit","form",(function(n){var i=e(this).serializeArray(),a=e(this).closest(".health-check-modal");n.preventDefault(),e.post(ajaxurl,i,(function(t){var n,o,s;!0===t.success?e(a.data("parent-field")).append(t.data.message):(n=t.data.message,o=i.action,s=a.data("parent-field"),e("#dynamic-content").html(n),e(".health-check-modal").data("modal-action",o).data("parent-field",s).show())})),t(a)}))}))},function(e,t){jQuery(document).ready((function(e){function t(){var n=e(".not-tested","#loopback-individual-plugins-list");if(n.length<1)return function(){var t=e(".individual-loopback-test-status","#test-single-no-theme"),n={action:"health-check-loopback-default-theme",_wpnonce:SiteHealth.nonce.loopback_default_theme};e.post(ajaxurl,n,(function(e){!0===e.success?t.html(e.data.message):healthCheckFailureModal(e.data,n.action,t)}),"json")}(),null;var i=n.first(),a={action:"health-check-loopback-individual-plugins",plugin:i.data("test-plugin"),_wpnonce:SiteHealth.nonce.loopback_individual_plugins},o=e(".individual-loopback-test-status",i);o.html(SiteHealth.string.running_tests),e.post(ajaxurl,a,(function(e){!0===e.success?(i.removeClass("not-tested"),o.html(e.data.message),t()):healthCheckFailureModal(e.data,a.action,o)}),"json")}e(".dashboard_page_health-check").on("click","#loopback-no-plugins",(function(t){var n=e(this),i=e(this).closest("p"),a={action:"health-check-loopback-no-plugins",_wpnonce:SiteHealth.nonce.loopback_no_plugins};t.preventDefault(),e(this).html('<span class="spinner" style="visibility: visible;"></span> '+SiteHealth.string.please_wait),e.post(ajaxurl,a,(function(e){n.remove(),!0===e.success?i.append(e.data.message):healthCheckFailureModal(e.data,a.action,i)}),"json")})).on("click","#loopback-individual-plugins",(function(n){n.preventDefault(),e(this).remove(),t()}))}))},function(e,t){jQuery(document).ready((function(e){var t,n=e(".health-check-debug-tab.active").length;function i(t){if(void 0!==t&&void 0!==t.status){var n,i=wp.template("health-check-issue"),a=e("#health-check-issues-"+t.status);SiteHealth.site_status.issues[t.status]++;var o=SiteHealth.site_status.issues[t.status];"critical"===t.status?n=o<=1?SiteHealth.string.site_info_heading_critical_single.replace("%s",'<span class="issue-count">'+o+"</span>"):SiteHealth.string.site_info_heading_critical_plural.replace("%s",'<span class="issue-count">'+o+"</span>"):"recommended"===t.status?n=o<=1?SiteHealth.string.site_info_heading_recommended_single.replace("%s",'<span class="issue-count">'+o+"</span>"):SiteHealth.string.site_info_heading_recommended_plural.replace("%s",'<span class="issue-count">'+o+"</span>"):"good"===t.status&&(n=o<=1?SiteHealth.string.site_info_heading_good_single.replace("%s",'<span class="issue-count">'+o+"</span>"):SiteHealth.string.site_info_heading_good_plural.replace("%s",'<span class="issue-count">'+o+"</span>")),n&&e(".site-health-issue-count-title",a).html(n),e(".issues","#health-check-issues-"+t.status).append(i(t))}}function a(){var t=e(".site-health-progress"),i=t.closest(".site-health-progress-wrapper"),a=e(".site-health-progress-label",i),o=e(".site-health-progress svg #bar"),s=parseInt(SiteHealth.site_status.issues.good,0)+parseInt(SiteHealth.site_status.issues.recommended,0)+1.5*parseInt(SiteHealth.site_status.issues.critical,0),r=.5*parseInt(SiteHealth.site_status.issues.recommended,0)+1.5*parseInt(SiteHealth.site_status.issues.critical,0),c=100-Math.ceil(r/s*100);if(0!==s){i.removeClass("loading");var l=o.attr("r");0>c&&(c=0),100<c&&(c=100);var u=(100-c)/100*(Math.PI*(2*l));o.css({strokeDashoffset:u}),1>parseInt(SiteHealth.site_status.issues.critical,0)&&e("#health-check-issues-critical").addClass("hidden"),1>parseInt(SiteHealth.site_status.issues.recommended,0)&&e("#health-check-issues-recommended").addClass("hidden"),n||e.post(ajaxurl,{action:"health-check-site-status-result",_wpnonce:SiteHealth.nonce.site_status_result,counts:SiteHealth.site_status.issues}),80<=c&&0===parseInt(SiteHealth.site_status.issues.critical,0)?(i.addClass("green").removeClass("orange"),a.text(SiteHealth.string.site_health_complete_pass),wp.a11y.speak(SiteHealth.string.site_health_complete_pass_sr)):(i.addClass("orange").removeClass("green"),a.text(SiteHealth.string.site_health_complete_fail),wp.a11y.speak(SiteHealth.string.site_health_complete_fail_sr)),100===c&&(e(".site-status-all-clear").removeClass("hide"),e(".site-status-has-issues").addClass("hide"))}else t.addClass("hidden")}e(".site-health-view-passed").on("click",(function(){var t=e("#health-check-issues-good");t.toggleClass("hidden"),e(this).attr("aria-expanded",!t.hasClass("hidden"))})),"undefined"!=typeof SiteHealth&&(0===SiteHealth.site_status.direct.length&&0===SiteHealth.site_status.async.length?a():SiteHealth.site_status.issues={good:0,recommended:0,critical:0},0<SiteHealth.site_status.direct.length&&e.each(SiteHealth.site_status.direct,(function(){i(this)})),0<SiteHealth.site_status.async.length?(t={action:"health-check-site-status",feature:SiteHealth.site_status.async[0].test,_wpnonce:SiteHealth.nonce.site_status},SiteHealth.site_status.async[0].completed=!0,e.post(ajaxurl,t,(function(n){i(n.data),function n(){var o=!0;1<=SiteHealth.site_status.async.length&&e.each(SiteHealth.site_status.async,(function(){return t={action:"health-check-site-status",feature:this.test,_wpnonce:SiteHealth.nonce.site_status},!!this.completed||(o=!1,this.completed=!0,e.post(ajaxurl,t,(function(e){void 0!==wp.hooks?i(wp.hooks.applyFilters("site_status_test_result",e.data)):i(e.data),n()})),!1)})),o&&a()}()}))):a())}))},function(e,t){jQuery(document).ready((function(e){e("#health-check-file-integrity").submit((function(t){var n={action:"health-check-files-integrity-check",_wpnonce:SiteHealth.nonce.files_integrity_check};t.preventDefault(),e("#tools-file-integrity-response-holder").html('<span class="spinner"></span>'),e("#tools-file-integrity-response-holder .spinner").addClass("is-active"),e.post(ajaxurl,n,(function(t){e("#tools-file-integrity-response-holder .spinner").removeClass("is-active"),e("#tools-file-integrity-response-holder").parent().css("height","auto"),e("#tools-file-integrity-response-holder").html(t.data.message)}))})),e("#tools-file-integrity-response-holder").on("click",'a[href="#health-check-diff"]',(function(t){var n=e(this).data("file");t.preventDefault(),e("#health-check-diff-modal").toggle(),e("#health-check-diff-modal #health-check-diff-modal-content .spinner").addClass("is-active");var i={action:"health-check-view-file-diff",file:n,_wpnonce:SiteHealth.nonce.view_file_diff};e.post(ajaxurl,i,(function(t){e("#health-check-diff-modal #health-check-diff-modal-diff").html(t.data.message),e("#health-check-diff-modal #health-check-diff-modal-content h3").html(n),e("#health-check-diff-modal #health-check-diff-modal-content .spinner").removeClass("is-active")}))}))}))},function(e,t){jQuery(document).ready((function(e){e("#health-check-diff-modal").on("click",'a[href="#health-check-diff-modal-close"]',(function(t){t.preventDefault(),e("#health-check-diff-modal").toggle(),e("#health-check-diff-modal #health-check-diff-modal-diff").html(""),e("#health-check-diff-modal #health-check-diff-modal-content h3").html("")})),e(document).keyup((function(t){27===t.which&&(e("#health-check-diff-modal").css("display","none"),e("#health-check-diff-modal #health-check-diff-modal-diff").html(""),e("#health-check-diff-modal #health-check-diff-modal-content h3").html(""))}))}))},function(e,t){jQuery(document).ready((function(e){e("#health-check-mail-check").submit((function(t){var n=e("#health-check-mail-check #email").val(),i=e("#health-check-mail-check #email_message").val();t.preventDefault(),e("#tools-mail-check-response-holder").html('<span class="spinner"></span>'),e("#tools-mail-check-response-holder .spinner").addClass("is-active");var a={action:"health-check-mail-check",email:n,email_message:i,_wpnonce:SiteHealth.nonce.mail_check};e.post(ajaxurl,a,(function(t){e("#tools-mail-check-response-holder .spinner").removeClass("is-active"),e("#tools-mail-check-response-holder").parent().css("height","auto"),e("#tools-mail-check-response-holder").html(t.data.message)}))}))}))},function(e,t){jQuery(document).ready((function(e){e("#health-check-tool-plugin-compat").click((function(){e("tr","#health-check-tool-plugin-compat-list").data("plugin-checked",!1),e(".spinner","#health-check-tool-plugin-compat-list").addClass("is-active"),e(this).attr("disabled",!0),function t(){var n=e('[data-plugin-checked="false"]',"#health-check-tool-plugin-compat-list");if(n.length<=0)return;var i=e(n[0]);i.attr("data-plugin-checked","true");var a={action:"health-check-tools-plugin-compat",slug:i.data("plugin-slug"),version:i.data("plugin-version"),_wpnonce:SiteHealth.nonce.tools_plugin_compat};e.post(ajaxurl,a,(function(n){e(".spinner",i).removeClass("is-active"),e(".supported-version",i).append(n.data.version),t()}))}()}))}))},,,function(e,t,n){"use strict";n.r(t);n(0),n(1);jQuery(document).ready((function(e){"undefined"!=typeof ClipboardJS&&new ClipboardJS(".site-health-copy-buttons .copy-button").on("success",(function(t){var n=e(t.trigger).closest("div");e(".success",n).addClass("visible"),wp.a11y.speak(SiteHealth.string.site_info_copied)}))}));n(2),n(3),n(4),n(5),n(6),n(7),n(8),n(9),n(10)}]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/javascript/troubleshooting-mode.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}({11:function(e,t,n){"use strict";n.r(t);n(12)},12:function(e,t){jQuery(document).ready((function(e){e(".show-remaining").click((function(){e(".hidden",e(this).closest("ul")).removeClass("hidden")}))}))}});
assets/mu-plugin/health-check-troubleshooting-mode.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Health Check Troubleshooting Mode
4
  Description: Conditionally disabled themes or plugins on your site for a given session, used to rule out conflicts during troubleshooting.
5
- Version: 1.7.0
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
@@ -10,7 +10,7 @@ if ( ! defined( 'ABSPATH' ) ) {
10
  }
11
 
12
  // Set the MU plugin version.
13
- define( 'HEALTH_CHECK_TROUBLESHOOTING_MODE_PLUGIN_VERSION', '1.7.0' );
14
 
15
  class Health_Check_Troubleshooting_MU {
16
  private $disable_hash = null;
@@ -32,6 +32,7 @@ class Health_Check_Troubleshooting_MU {
32
  );
33
 
34
  private $default_themes = array(
 
35
  'twentynineteen',
36
  'twentyseventeen',
37
  'twentysixteen',
@@ -116,8 +117,13 @@ class Health_Check_Troubleshooting_MU {
116
  return;
117
  }
118
 
119
- wp_enqueue_style( 'health-check-troubleshooting-mode', plugins_url( '/health-check/assets/css/health-check-troubleshooting-mode.css' ), array(), HEALTH_CHECK_TROUBLESHOOTING_MODE_PLUGIN_VERSION );
120
- wp_enqueue_script( 'health-check', plugins_url( '/health-check/assets/javascript/health-check.js' ), array( 'jquery', 'wp-a11y', 'clipboard', 'wp-util' ), HEALTH_CHECK_TROUBLESHOOTING_MODE_PLUGIN_VERSION, true );
 
 
 
 
 
121
  }
122
 
123
  /**
@@ -228,7 +234,7 @@ class Health_Check_Troubleshooting_MU {
228
  $plugin_slug = explode( '/', $single_plugin );
229
  $plugin_slug = $plugin_slug[0];
230
 
231
- if ( in_array( $single_plugin, $this->active_plugins ) ) {
232
  $this->allowed_plugins[ $plugin_slug ] = $plugin_slug;
233
  }
234
  }
@@ -253,7 +259,7 @@ class Health_Check_Troubleshooting_MU {
253
  $plugin_slug = explode( '/', $single_plugin );
254
  $plugin_slug = $plugin_slug[0];
255
 
256
- if ( in_array( $single_plugin, $this->active_plugins ) ) {
257
  $this->allowed_plugins[ $plugin_slug ] = $plugin_slug;
258
  }
259
  }
@@ -278,7 +284,7 @@ class Health_Check_Troubleshooting_MU {
278
  $plugin_slug = explode( '/', $single_plugin );
279
  $plugin_slug = $plugin_slug[0];
280
 
281
- if ( in_array( $single_plugin, $this->active_plugins ) ) {
282
  unset( $this->allowed_plugins[ $plugin_slug ] );
283
  }
284
  }
@@ -347,7 +353,7 @@ class Health_Check_Troubleshooting_MU {
347
  $actions = array();
348
 
349
  // This isn't an active plugin, so does not apply to our troubleshooting scenarios.
350
- if ( ! in_array( $plugin_file, $this->active_plugins ) ) {
351
  return $actions;
352
  }
353
 
@@ -359,7 +365,7 @@ class Health_Check_Troubleshooting_MU {
359
  $plugin_slug = $plugin_slug[0];
360
  }
361
 
362
- if ( in_array( $plugin_slug, $this->allowed_plugins ) ) {
363
  $actions['troubleshoot-disable'] = sprintf(
364
  '<a href="%s">%s</a>',
365
  esc_url(
@@ -457,7 +463,7 @@ class Health_Check_Troubleshooting_MU {
457
  $plugin_parts = explode( '/', $plugin_path );
458
 
459
  // We may want to allow individual, or groups of plugins, so introduce a skip-mechanic for those scenarios.
460
- if ( in_array( $plugin_parts[0], $this->allowed_plugins ) ) {
461
  continue;
462
  }
463
 
@@ -725,7 +731,7 @@ class Health_Check_Troubleshooting_MU {
725
  $notices[] = array(
726
  'severity' => $severity,
727
  'message' => $message,
728
- 'time' => date( 'Y-m-d H:i' ),
729
  );
730
 
731
  update_option( 'health-check-dashboard-notices', $notices );
@@ -805,7 +811,7 @@ class Health_Check_Troubleshooting_MU {
805
 
806
  $enabled = true;
807
 
808
- if ( in_array( $plugin_slug, $this->allowed_plugins ) ) {
809
  $label = sprintf(
810
  // Translators: %s: Plugin slug.
811
  esc_html__( 'Disable %s', 'health-check' ),
@@ -1031,7 +1037,7 @@ class Health_Check_Troubleshooting_MU {
1031
 
1032
  $actions = array();
1033
 
1034
- if ( in_array( $plugin_slug, $this->allowed_plugins ) ) {
1035
  $actions[] = sprintf(
1036
  '<a href="%s" aria-label="%s">%s</a>',
1037
  esc_url(
2
  /*
3
  Plugin Name: Health Check Troubleshooting Mode
4
  Description: Conditionally disabled themes or plugins on your site for a given session, used to rule out conflicts during troubleshooting.
5
+ Version: 1.7.1
6
  */
7
 
8
  if ( ! defined( 'ABSPATH' ) ) {
10
  }
11
 
12
  // Set the MU plugin version.
13
+ define( 'HEALTH_CHECK_TROUBLESHOOTING_MODE_PLUGIN_VERSION', '1.7.1' );
14
 
15
  class Health_Check_Troubleshooting_MU {
16
  private $disable_hash = null;
32
  );
33
 
34
  private $default_themes = array(
35
+ 'twentytwenty',
36
  'twentynineteen',
37
  'twentyseventeen',
38
  'twentysixteen',
117
  return;
118
  }
119
 
120
+ wp_enqueue_style( 'health-check', plugins_url( '/health-check/assets/css/health-check.css' ), array(), HEALTH_CHECK_TROUBLESHOOTING_MODE_PLUGIN_VERSION );
121
+
122
+ if ( ! wp_script_is( 'site-health', 'registered' ) ) {
123
+ wp_enqueue_script( 'site-health', plugins_url( '/health-check/assets/javascript/health-check.js' ), array( 'jquery', 'wp-a11y', 'wp-util' ), HEALTH_CHECK_TROUBLESHOOTING_MODE_PLUGIN_VERSION, true );
124
+ }
125
+
126
+ wp_enqueue_script( 'health-check', plugins_url( '/health-check/assets/javascript/troubleshooting-mode.js' ), array( 'site-health' ), HEALTH_CHECK_TROUBLESHOOTING_MODE_PLUGIN_VERSION, true );
127
  }
128
 
129
  /**
234
  $plugin_slug = explode( '/', $single_plugin );
235
  $plugin_slug = $plugin_slug[0];
236
 
237
+ if ( in_array( $single_plugin, $this->active_plugins, true ) ) {
238
  $this->allowed_plugins[ $plugin_slug ] = $plugin_slug;
239
  }
240
  }
259
  $plugin_slug = explode( '/', $single_plugin );
260
  $plugin_slug = $plugin_slug[0];
261
 
262
+ if ( in_array( $single_plugin, $this->active_plugins, true ) ) {
263
  $this->allowed_plugins[ $plugin_slug ] = $plugin_slug;
264
  }
265
  }
284
  $plugin_slug = explode( '/', $single_plugin );
285
  $plugin_slug = $plugin_slug[0];
286
 
287
+ if ( in_array( $single_plugin, $this->active_plugins, true ) ) {
288
  unset( $this->allowed_plugins[ $plugin_slug ] );
289
  }
290
  }
353
  $actions = array();
354
 
355
  // This isn't an active plugin, so does not apply to our troubleshooting scenarios.
356
+ if ( ! in_array( $plugin_file, $this->active_plugins, true ) ) {
357
  return $actions;
358
  }
359
 
365
  $plugin_slug = $plugin_slug[0];
366
  }
367
 
368
+ if ( in_array( $plugin_slug, $this->allowed_plugins, true ) ) {
369
  $actions['troubleshoot-disable'] = sprintf(
370
  '<a href="%s">%s</a>',
371
  esc_url(
463
  $plugin_parts = explode( '/', $plugin_path );
464
 
465
  // We may want to allow individual, or groups of plugins, so introduce a skip-mechanic for those scenarios.
466
+ if ( in_array( $plugin_parts[0], $this->allowed_plugins, true ) ) {
467
  continue;
468
  }
469
 
731
  $notices[] = array(
732
  'severity' => $severity,
733
  'message' => $message,
734
+ 'time' => gmdate( 'Y-m-d H:i' ),
735
  );
736
 
737
  update_option( 'health-check-dashboard-notices', $notices );
811
 
812
  $enabled = true;
813
 
814
+ if ( in_array( $plugin_slug, $this->allowed_plugins, true ) ) {
815
  $label = sprintf(
816
  // Translators: %s: Plugin slug.
817
  esc_html__( 'Disable %s', 'health-check' ),
1037
 
1038
  $actions = array();
1039
 
1040
+ if ( in_array( $plugin_slug, $this->allowed_plugins, true ) ) {
1041
  $actions[] = sprintf(
1042
  '<a href="%s" aria-label="%s">%s</a>',
1043
  esc_url(
health-check.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin URI: https://wordpress.org/plugins/health-check/
10
  * Description: Checks the health of your WordPress install.
11
  * Author: The WordPress.org community
12
- * Version: 1.4.3
13
  * Author URI: https://wordpress.org/plugins/health-check/
14
  * Text Domain: health-check
15
  */
@@ -35,7 +35,7 @@ define( 'HEALTH_CHECK_MYSQL_MIN_VERSION', '5.0' );
35
  define( 'HEALTH_CHECK_MYSQL_REC_VERSION', '5.6' );
36
 
37
  // Set the plugin version.
38
- define( 'HEALTH_CHECK_PLUGIN_VERSION', '1.4.3' );
39
 
40
  // Set the plugin file.
41
  define( 'HEALTH_CHECK_PLUGIN_FILE', __FILE__ );
9
  * Plugin URI: https://wordpress.org/plugins/health-check/
10
  * Description: Checks the health of your WordPress install.
11
  * Author: The WordPress.org community
12
+ * Version: 1.4.4
13
  * Author URI: https://wordpress.org/plugins/health-check/
14
  * Text Domain: health-check
15
  */
35
  define( 'HEALTH_CHECK_MYSQL_REC_VERSION', '5.6' );
36
 
37
  // Set the plugin version.
38
+ define( 'HEALTH_CHECK_PLUGIN_VERSION', '1.4.4' );
39
 
40
  // Set the plugin file.
41
  define( 'HEALTH_CHECK_PLUGIN_FILE', __FILE__ );
includes/class-health-check-dashboard-widget.php CHANGED
@@ -12,18 +12,17 @@ class Health_Check_Dashboard_Widget {
12
  }
13
 
14
  function dashboard_setup() {
15
- global $wp_version;
16
 
17
- // Don't add the dashboard widget if core already does so.
18
- if ( version_compare( $wp_version, '5.4.0', '>=' ) ) {
19
- return;
 
 
 
 
 
20
  }
21
-
22
- wp_add_dashboard_widget(
23
- 'health_check_status',
24
- __( 'Site Health Status', 'health-check' ),
25
- array( $this, 'widget_render' )
26
- );
27
  }
28
 
29
  function widget_render() {
12
  }
13
 
14
  function dashboard_setup() {
15
+ global $wp_meta_boxes;
16
 
17
+ if ( ! isset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health'] ) ) {
18
+ wp_add_dashboard_widget(
19
+ 'dashboard_site_health',
20
+ __( 'Site Health Status', 'health-check' ),
21
+ array( $this, 'widget_render' )
22
+ );
23
+ } else {
24
+ $wp_meta_boxes['dashboard']['normal']['core']['dashboard_site_health']['callback'] = array( $this, 'widget_render' );
25
  }
 
 
 
 
 
 
26
  }
27
 
28
  function widget_render() {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: wordpressdotorg, westi, pento, Clorith
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.4
7
- Stable tag: 1.4.3
8
  License: GPLv2
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -49,6 +49,10 @@ At this time, the plugin has been tested with every version of PHP from 5.2 thro
49
 
50
  == Changelog ==
51
 
 
 
 
 
52
  = v1.4.3 =
53
  * Compatibility with WordPress 5.4
54
 
4
  Requires at least: 4.0
5
  Requires PHP: 5.2
6
  Tested up to: 5.4
7
+ Stable tag: 1.4.4
8
  License: GPLv2
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
49
 
50
  == Changelog ==
51
 
52
+ = v1.4.4 =
53
+ * Fixed hidden JavaScript warning when using troubleshooting mode on the Dashboard
54
+ * Fixed plugin and theme lists staying hidden in troubleshooting mode on the Dashboard
55
+
56
  = v1.4.3 =
57
  * Compatibility with WordPress 5.4
58