Query Monitor - Version 3.5.0

Version Description

Download this release

Release Info

Developer johnbillion
Plugin Icon 128x128 Query Monitor
Version 3.5.0
Comparing to
See all releases

Code changes from version 3.4.0 to 3.5.0

Files changed (60) hide show
  1. assets/query-monitor-dark.css +304 -55
  2. assets/query-monitor.css +296 -47
  3. assets/query-monitor.js +37 -8
  4. classes/Collector.php +7 -2
  5. classes/Dispatcher.php +10 -0
  6. classes/Hook.php +1 -1
  7. collectors/admin.php +0 -4
  8. collectors/assets.php +7 -3
  9. collectors/assets_scripts.php +0 -5
  10. collectors/assets_styles.php +0 -5
  11. collectors/block_editor.php +4 -7
  12. collectors/cache.php +0 -4
  13. collectors/caps.php +40 -11
  14. collectors/conditionals.php +0 -4
  15. collectors/db_callers.php +0 -4
  16. collectors/db_components.php +0 -4
  17. collectors/db_dupes.php +0 -4
  18. collectors/db_queries.php +2 -6
  19. collectors/debug_bar.php +0 -9
  20. collectors/environment.php +0 -4
  21. collectors/hooks.php +0 -4
  22. collectors/http.php +2 -7
  23. collectors/languages.php +4 -5
  24. collectors/logger.php +0 -4
  25. collectors/overview.php +0 -4
  26. collectors/php_errors.php +0 -4
  27. collectors/raw_request.php +1 -12
  28. collectors/redirects.php +0 -4
  29. collectors/request.php +28 -4
  30. collectors/theme.php +0 -4
  31. collectors/timing.php +0 -4
  32. collectors/transients.php +34 -6
  33. dispatchers/Html.php +58 -7
  34. output/Html.php +53 -8
  35. output/html/admin.php +4 -0
  36. output/html/assets.php +27 -3
  37. output/html/assets_scripts.php +6 -2
  38. output/html/assets_styles.php +6 -2
  39. output/html/block_editor.php +9 -4
  40. output/html/caps.php +29 -43
  41. output/html/conditionals.php +4 -0
  42. output/html/db_callers.php +4 -0
  43. output/html/db_components.php +4 -0
  44. output/html/db_dupes.php +5 -1
  45. output/html/db_queries.php +21 -8
  46. output/html/debug_bar.php +10 -0
  47. output/html/environment.php +8 -4
  48. output/html/headers.php +11 -0
  49. output/html/hooks.php +6 -3
  50. output/html/http.php +28 -8
  51. output/html/languages.php +8 -6
  52. output/html/logger.php +22 -5
  53. output/html/overview.php +18 -7
  54. output/html/php_errors.php +24 -4
  55. output/html/request.php +4 -0
  56. output/html/theme.php +16 -11
  57. output/html/timing.php +9 -3
  58. output/html/transients.php +21 -20
  59. query-monitor.php +1 -1
  60. readme.txt +5 -5
assets/query-monitor-dark.css CHANGED
@@ -6,43 +6,54 @@
6
  #wpadminbar .quicklinks .menupop ul li.qm-true > a {
7
  color: #8c8 !important;
8
  }
 
9
  #wpadminbar .quicklinks .menupop ul li.qm-true > a:focus, #wpadminbar .quicklinks .menupop ul li.qm-true > a:hover {
10
- color: #52b552 !important;
11
  }
 
12
  #wpadminbar .qm-alert {
13
  background-color: #f60;
14
  }
 
 
 
 
 
 
 
15
  #wpadminbar #wp-admin-bar-query-monitor-notices a,
 
 
16
  #wpadminbar .qm-notice {
17
  background-color: #740;
18
  }
19
- #wpadminbar #wp-admin-bar-query-monitor-deprecateds a,
20
- #wpadminbar .qm-deprecated {
21
- background-color: #3c3c3c;
22
- }
23
- #wpadminbar #wp-admin-bar-query-monitor-stricts a,
24
- #wpadminbar .qm-strict {
25
- background-color: #3c3c3c;
26
- }
27
  #wpadminbar #wp-admin-bar-query-monitor-expensive a,
28
  #wpadminbar .qm-expensive {
29
  background-color: #b60;
30
  }
 
 
 
 
 
 
31
  #wpadminbar #wp-admin-bar-query-monitor-logger-warning a,
32
  #wpadminbar #wp-admin-bar-query-monitor-warnings a,
 
 
33
  #wpadminbar .qm-warning {
34
  background-color: #c00;
35
  }
 
36
  #wpadminbar #wp-admin-bar-query-monitor-logger-warning a:hover,
37
  #wpadminbar #wp-admin-bar-query-monitor-warnings a:hover,
 
 
38
  #wpadminbar .qm-warning:hover {
39
- background-color: #b00;
40
- color: #ddd !important;
41
- }
42
- #wpadminbar #wp-admin-bar-query-monitor-errors a,
43
- #wpadminbar .qm-error {
44
- background-color: #c00;
45
  }
 
46
  #wpadminbar #wp-admin-bar-query-monitor .ab-icon {
47
  color: #aaa !important;
48
  display: none !important;
@@ -50,6 +61,7 @@
50
  padding: 0 10px !important;
51
  width: auto !important;
52
  }
 
53
  @media screen and (max-width: 782px) {
54
  #wpadminbar #wp-admin-bar-query-monitor .ab-icon {
55
  display: block !important;
@@ -66,6 +78,9 @@
66
  }
67
 
68
  body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover):not(.hover) .ab-label,
 
 
 
69
  #wp-admin-bar-query-monitor-deprecateds a,
70
  #wp-admin-bar-query-monitor-stricts a,
71
  #wp-admin-bar-query-monitor-notices a,
@@ -95,6 +110,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
95
  #query-monitor-main dt,
96
  #query-monitor-main dd,
97
  #query-monitor-main button,
 
98
  #query-monitor-main label,
99
  #query-monitor-main select,
100
  #query-monitor-main table,
@@ -104,6 +120,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
104
  #query-monitor-main ol,
105
  #query-monitor-main li,
106
  #query-monitor-main code,
 
107
  #query-monitor-main a,
108
  #query-monitor-main h1,
109
  #query-monitor-main h2,
@@ -130,6 +147,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
130
  letter-spacing: normal !important;
131
  line-height: 18px !important;
132
  margin: 0 !important;
 
133
  outline: none !important;
134
  padding: 0 !important;
135
  text-align: left !important;
@@ -143,6 +161,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
143
  word-break: normal !important;
144
  word-wrap: normal !important;
145
  }
 
146
  #query-monitor-main::before, #query-monitor-main::after,
147
  #query-monitor-main dl::before,
148
  #query-monitor-main dl::after,
@@ -152,6 +171,8 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
152
  #query-monitor-main dd::after,
153
  #query-monitor-main button::before,
154
  #query-monitor-main button::after,
 
 
155
  #query-monitor-main label::before,
156
  #query-monitor-main label::after,
157
  #query-monitor-main select::before,
@@ -170,6 +191,8 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
170
  #query-monitor-main li::after,
171
  #query-monitor-main code::before,
172
  #query-monitor-main code::after,
 
 
173
  #query-monitor-main a::before,
174
  #query-monitor-main a::after,
175
  #query-monitor-main h1::before,
@@ -192,9 +215,10 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
192
  #query-monitor-main p::after {
193
  display: none !important;
194
  }
 
195
  #query-monitor-main {
196
  background: #23282d !important;
197
- border-top: 1px solid #bbc8d4 !important;
198
  bottom: 0 !important;
199
  direction: ltr !important;
200
  display: none;
@@ -205,47 +229,58 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
205
  text-align: left !important;
206
  z-index: 99998 !important;
207
  }
 
208
  #query-monitor-main ::selection {
209
  background-color: #B9D6FB !important;
210
  color: #bbc8d4 !important;
211
  }
 
212
  #query-monitor-main strong,
213
  #query-monitor-main b {
214
  font-weight: bold !important;
215
  }
 
216
  #query-monitor-main em,
217
  #query-monitor-main i {
218
  font-style: italic !important;
219
  }
 
220
  #query-monitor-main.qm-show, #query-monitor-main.qm-peek {
221
  display: flex;
222
  flex-direction: column !important;
223
  height: 27px;
224
  }
 
225
  #query-monitor-main.qm-show {
226
  height: 40%;
227
  width: 40%;
228
  }
 
229
  #query-monitor-main:not(.qm-show-right) {
230
  width: 100% !important;
231
  }
 
232
  #query-monitor-main.qm-show-right {
233
- height: calc( 100vh - 32px ) !important;
234
  top: 32px !important;
235
  left: unset !important;
236
  border-top: 0 !important;
237
- border-left: 1px solid #bbc8d4 !important;
238
  }
 
239
  #query-monitor-main.qm-show-right #qm-panel-menu,
240
  #query-monitor-main.qm-show-right #qm-title h1.qm-title-heading {
241
  display: none;
242
  }
 
243
  #query-monitor-main.qm-show-right #qm-title div.qm-title-heading {
244
  display: block;
245
  }
 
246
  #query-monitor-main.qm-show-right #qm-title {
247
  cursor: default !important;
248
  }
 
249
  #query-monitor-main.qm-show-right #qm-side-resizer {
250
  background: transparent !important;
251
  cursor: ew-resize !important;
@@ -257,20 +292,23 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
257
  width: 4px !important;
258
  z-index: 2 !important;
259
  }
 
260
  #query-monitor-main.qm-show-right.qm-peek {
261
  height: 100vh !important;
262
  top: 0 !important;
263
  }
 
264
  #query-monitor-main #qm-wrapper {
265
  display: flex;
266
  flex-grow: 1 !important;
267
  /* Fix nested scrolling in Firefox. See https://bugzilla.mozilla.org/show_bug.cgi?id=1043520: */
268
  min-height: 0;
269
  }
 
270
  #query-monitor-main #qm-title {
271
  align-items: center !important;
272
  background: #32373c !important;
273
- border-bottom: 1px solid #bbc8d4 !important;
274
  cursor: ns-resize !important;
275
  display: flex !important;
276
  flex-shrink: 0 !important;
@@ -281,31 +319,39 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
281
  -webkit-user-select: none !important;
282
  user-select: none !important;
283
  }
 
284
  #query-monitor-main #qm-title .qm-title-heading {
285
  border-right: 1px solid #bbb !important;
286
  flex-grow: 1 !important;
287
  margin-right: 6px !important;
288
  }
 
289
  #query-monitor-main #qm-title div.qm-title-heading {
290
  display: none;
291
  }
 
292
  #query-monitor-main #qm-title .qm-title-button {
293
  flex-shrink: 0 !important;
294
  }
 
295
  #query-monitor-main #qm-title .dashicons {
296
  transition: none !important;
297
  }
 
298
  #query-monitor-main #qm-title .qm-button-container-close {
299
  margin-right: 10px !important;
300
  }
 
301
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
302
  margin: 3px 0 3px !important;
303
  }
 
304
  @media screen and (max-width: 960px) {
305
  #query-monitor-main #qm-title .qm-button-container-position {
306
  display: none !important;
307
  }
308
  }
 
309
  #query-monitor-main #qm-title button {
310
  background: transparent !important;
311
  color: #bbc8d4 !important;
@@ -315,33 +361,44 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
315
  min-width: auto !important;
316
  padding: 0px 4px !important;
317
  }
 
 
 
318
  #query-monitor-main #qm-title button:focus,
319
  #query-monitor-main #qm-title button:hover {
320
  background: #bbc8d4 !important;
321
  color: #32373c !important;
322
  }
 
 
323
  #query-monitor-main #qm-title button:active {
324
  background: #ccc !important;
325
  }
 
326
  #query-monitor-main #qm-title button.qm-button-active {
327
  color: #3879d9 !important;
328
  }
 
329
  #query-monitor-main #qm-title .qm-button-container-settings .dashicons {
330
  font-size: 17px !important;
331
  margin: 4px 0 2px !important;
332
  }
 
333
  #query-monitor-main #qm-title .qm-button-container-position .dashicons {
334
  font-size: 15px !important;
335
  margin: 2px -1px 3px 4px !important;
336
  transform: scaleX(-1) rotate(90deg) !important;
337
  }
 
338
  #query-monitor-main.qm-show-right #qm-title .qm-button-container-position .dashicons {
339
  margin: 4px 1px 0px 1px !important;
340
  transform: none !important;
341
  }
 
342
  #query-monitor-main .qm {
343
  display: none !important;
344
  }
 
345
  #query-monitor-main #qm-panel-menu {
346
  background: #23282d !important;
347
  flex-shrink: 0 !important;
@@ -349,6 +406,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
349
  overscroll-behavior: contain !important;
350
  height: auto !important;
351
  }
 
352
  #query-monitor-main #qm-panel-menu ul {
353
  display: block !important;
354
  list-style: none !important;
@@ -357,16 +415,18 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
357
  width: auto !important;
358
  height: auto !important;
359
  }
 
360
  #query-monitor-main #qm-panel-menu li {
361
  display: list-item !important;
362
  margin: 0 !important;
363
  padding: 0 !important;
364
  height: auto !important;
365
  }
 
366
  #query-monitor-main #qm-panel-menu li button {
367
  background: #23282d !important;
368
  border-bottom: 1px solid #32373c !important;
369
- border-right: 1px solid #bbc8d4 !important;
370
  color: #bbc8d4 !important;
371
  cursor: pointer !important;
372
  display: block !important;
@@ -375,44 +435,61 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
375
  text-decoration: none !important;
376
  width: 100% !important;
377
  }
 
378
  #query-monitor-main #qm-panel-menu li button:focus,
379
  #query-monitor-main #qm-panel-menu li button:hover {
380
  background: #3e444a !important;
381
  color: #bbc8d4 !important;
382
  }
 
383
  #query-monitor-main #qm-panel-menu li button:focus {
384
  text-decoration: underline !important;
385
  }
 
 
 
 
 
 
 
 
386
  #query-monitor-main #qm-panel-menu li.qm-current-menu button {
387
  background: #32373c !important;
388
  color: #bbc8d4 !important;
389
  }
 
390
  #query-monitor-main #qm-panel-menu li.qm-current-menu button:focus {
391
  background: #3e444a !important;
392
  color: #bbc8d4 !important;
393
  }
 
394
  #query-monitor-main #qm-panel-menu li.qm-current-menu button:hover {
395
  background: #3e444a !important;
396
  color: #bbc8d4 !important;
397
  }
 
398
  #query-monitor-main #qm-panel-menu li li button::before {
399
  content: "\2514" !important;
400
  display: inline-block !important;
401
  margin-right: 5px !important;
402
  }
 
403
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"] {
404
  background: #0073aa !important;
405
  color: #fff !important;
406
  text-shadow: 0 -1px 1px #006291, 1px 0 1px #006291, 0 1px 1px #006291, -1px 0 1px #006291 !important;
407
  }
 
408
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:focus {
409
  background: #0084c4 !important;
410
  color: #fff !important;
411
  }
 
412
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:hover {
413
  background: #0073aa !important;
414
  color: #fff !important;
415
  }
 
416
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:after {
417
  border: solid 8px transparent;
418
  border-right-color: #23282d;
@@ -426,65 +503,79 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
426
  top: 50%;
427
  width: 0;
428
  }
 
429
  #query-monitor-main #qm-panels {
430
  flex-grow: 1 !important;
431
  overflow-y: scroll !important;
432
  overscroll-behavior: contain !important;
433
  }
 
434
  #query-monitor-main .qm.qm-panel-show {
435
  display: block !important;
436
  }
 
437
  #query-monitor-main .qm:focus {
438
  outline: 0 !important;
439
  /* @TODO might not need this any more */
440
  }
 
441
  #query-monitor-main .qm-boxed {
442
  display: flex !important;
443
  flex-wrap: wrap !important;
444
  }
 
445
  #query-monitor-main .qm-boxed:not(#qm-broken) + .qm-boxed {
446
- border-top: 1px solid #bbc8d4 !important;
447
  padding-top: 10px !important;
448
  }
 
449
  #query-monitor-main .qm-boxed-wrap {
450
  flex-wrap: wrap !important;
451
  }
 
452
  #query-monitor-main .qm .qm-none {
453
  margin: 2em !important;
454
  }
 
455
  #query-monitor-main .qm .qm-none p {
456
  font-style: italic !important;
457
  text-align: center !important;
458
  }
 
459
  #query-monitor-main .qm table {
460
  border: none !important;
461
- border-bottom: 1px solid #23282d !important;
462
  border-collapse: collapse !important;
463
- box-shadow: none !important;
464
  color: #bbc8d4 !important;
465
  margin: 0 !important;
466
  table-layout: auto !important;
467
  width: 100% !important;
468
  }
 
469
  #query-monitor-main .qm table + table {
470
  border-top: 1px solid #23282d !important;
471
  margin-top: 5px !important;
472
  }
 
473
  #query-monitor-main .qm tr {
474
  border: none !important;
475
  }
 
476
  #query-monitor-main .qm tbody th,
477
  #query-monitor-main .qm tbody td,
478
  #query-monitor-main .qm tfoot th,
479
  #query-monitor-main .qm tfoot td {
480
  border: 1px solid #23282d !important;
481
  padding: 5px 5px 4px 5px !important;
 
482
  }
 
483
  #query-monitor-main .qm tbody th,
484
  #query-monitor-main .qm tbody td {
485
  border-bottom: none !important;
486
  border-top: none !important;
487
  }
 
488
  #query-monitor-main .qm thead th {
489
  background: #32373c !important;
490
  border: 1px solid #23282d !important;
@@ -496,150 +587,189 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
496
  top: 0 !important;
497
  z-index: 1 !important;
498
  }
 
 
 
 
 
 
499
  #query-monitor-main .qm thead .qm-th {
500
  display: flex !important;
501
  }
 
502
  #query-monitor-main .qm tfoot tr td,
503
  #query-monitor-main .qm tfoot tr th {
504
  background: #32373c !important;
505
- border: 1px solid #23282d !important;
506
- border-bottom: none !important;
507
  bottom: 0 !important;
508
  box-shadow: inset 0px 1px 0px #23282d !important;
509
  position: -webkit-sticky !important;
510
  position: sticky !important;
511
  }
 
512
  #query-monitor-main .qm th:first-child,
513
  #query-monitor-main .qm td:first-child {
514
  border-left: none !important;
515
  }
 
516
  #query-monitor-main .qm th:last-child,
517
  #query-monitor-main .qm td:last-child {
518
  border-right: none !important;
519
  }
 
520
  #query-monitor-main .qm tfoot td.qm-num,
521
  #query-monitor-main .qm tfoot th.qm-num,
522
  #query-monitor-main .qm thead td.qm-num,
523
  #query-monitor-main .qm thead th.qm-num {
524
  width: 5.5em !important;
525
  }
 
526
  #query-monitor-main .qm th.qm-num,
527
  #query-monitor-main .qm td.qm-num {
528
  text-align: right !important;
529
  }
 
530
  #query-monitor-main .qm td.qm-num {
531
  font-family: Menlo, Monaco, Consolas, monospace !important;
532
  font-size: 11px !important;
533
  line-height: 18px !important;
534
  }
 
535
  #query-monitor-main .qm td.qm-row-sql {
536
  min-width: 25em !important;
537
  }
 
 
538
  #query-monitor-main .qm td.qm-row-block-html {
539
  max-width: 40em !important;
540
  }
 
541
  #query-monitor-main .qm tr.qm-warn td.qm-col-status,
542
  #query-monitor-main .qm td.qm-url,
543
  #query-monitor-main .qm th.qm-col-message,
544
  #query-monitor-main .qm td.qm-row-component {
545
  min-width: 15em !important;
546
  }
547
- #query-monitor-main .qm td .qm-toggler {
548
- padding: 0 22px 0 0 !important;
 
549
  position: relative !important;
550
  }
 
551
  #query-monitor-main .qm td.qm-has-toggle:not(.qm-toggled-on) .qm-supplemental {
552
  display: none;
553
  }
 
554
  #query-monitor-main .qm .qm-inner-toggle {
555
  padding: 4px 6px !important;
556
  }
 
557
  #query-monitor-main .qm .qm-has-inner .qm-toggled > table {
558
  border-bottom: none !important;
559
  border-top: 1px solid #23282d !important;
560
  }
 
561
  #query-monitor-main .qm td.qm-has-inner .qm-toggler,
562
  #query-monitor-main .qm td.qm-has-inner {
563
  padding: 0 !important;
564
  }
 
565
  #query-monitor-main .qm caption h2 {
566
  font-size: 14px !important;
567
  margin: 20px !important;
568
  }
 
569
  #query-monitor-main .qm-concerns table {
570
  border-top: 1px solid #23282d !important;
571
  margin-bottom: 20px !important;
572
  }
 
573
  #query-monitor-main .qm-non-tabular {
574
  padding: 10px 20px !important;
575
  }
 
576
  #query-monitor-main .qm-non-tabular h3 {
577
  font-size: 14px !important;
578
  margin: 0 0 15px 0 !important;
579
  }
 
580
  #query-monitor-main .qm-non-tabular h4 {
581
  font-size: 12px !important;
582
  margin: 20px 0 10px !important;
583
  }
 
584
  #query-monitor-main .qm-non-tabular p {
585
  margin-bottom: 10px !important;
586
  }
 
587
  #query-monitor-main .qm-non-tabular dl {
588
  display: flex !important;
589
  flex-wrap: wrap !important;
590
  max-width: 60em !important;
591
  }
 
592
  #query-monitor-main .qm-non-tabular dt {
593
- border-top: 1px solid #bbc8d4 !important;
594
  flex-grow: 0;
595
  flex: 1 0 16em;
596
  padding: 10px 10px 10px 0 !important;
597
  }
 
598
  #query-monitor-main .qm-non-tabular dd {
599
- border-top: 1px solid #bbc8d4 !important;
600
  flex: 1 0 calc(100% - 10px - 16em);
601
  padding: 10px 0 !important;
602
  }
 
603
  #query-monitor-main .qm-non-tabular section,
604
  #query-monitor-main .qm-non-tabular .qm-section {
605
  margin: 0 0 30px 0 !important;
606
  }
 
607
  #query-monitor-main .qm-non-tabular .qm-boxed section,
608
  #query-monitor-main .qm-non-tabular .qm-boxed .qm-section {
609
- border-right: 1px solid #bbc8d4 !important;
610
  margin: 0 20px 10px 0 !important;
611
  padding: 10px 20px 10px 0 !important;
612
  }
 
613
  #query-monitor-main .qm-non-tabular .qm-boxed section:last-child,
614
  #query-monitor-main .qm-non-tabular .qm-boxed .qm-section:last-child {
615
  border-right: none !important;
616
  margin-right: 0 !important;
617
  padding-right: 20px !important;
618
  }
 
619
  #query-monitor-main .qm-non-tabular table {
620
  border-bottom-color: #23282d !important;
621
  }
 
622
  #query-monitor-main #qm-conditionals li {
623
  display: inline-block !important;
624
  margin: 0 20px 5px 0 !important;
625
  }
 
626
  #query-monitor-main .qm ol,
627
  #query-monitor-main .qm ul {
628
  list-style: none !important;
629
  }
 
630
  #query-monitor-main .qm li {
631
  display: list-item !important;
632
  list-style: none !important;
633
  }
 
634
  #query-monitor-main .qm li::before {
635
  content: '' !important;
636
  }
 
637
  #query-monitor-main .qm code,
638
  #query-monitor-main .qm pre {
639
  font-family: Menlo, Monaco, Consolas, monospace !important;
640
  font-size: 11px !important;
641
  line-height: 18px !important;
642
  }
 
643
  #query-monitor-main .qm pre {
644
  background: transparent !important;
645
  height: auto !important;
@@ -647,64 +777,76 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
647
  padding: 0 !important;
648
  width: auto !important;
649
  }
 
650
  #query-monitor-main .qm .qm-true code,
651
  #query-monitor-main .qm p.qm-true,
652
  #query-monitor-main .qm span.qm-true,
653
  #query-monitor-main .qm td.qm-true {
654
- color: #4a4 !important;
655
  }
 
656
  #query-monitor-main .qm .qm-false code,
657
  #query-monitor-main .qm span.qm-false,
658
  #query-monitor-main .qm td.qm-false {
659
  color: #999 !important;
660
  }
 
661
  #query-monitor-main .qm .qm-num,
662
  #query-monitor-main .qm code,
663
  #query-monitor-main .qm .qm-nowrap {
664
  white-space: nowrap !important;
665
  }
 
666
  #query-monitor-main .qm .qm-wrap code,
667
  #query-monitor-main .qm .qm-wrap {
668
  white-space: normal !important;
669
  word-break: break-all !important;
670
  word-wrap: break-word !important;
671
  }
 
672
  #query-monitor-main .qm .qm-pre-wrap code {
673
  white-space: pre-wrap !important;
674
  word-break: break-all !important;
675
  word-wrap: break-word !important;
676
  }
 
677
  #query-monitor-main .qm .qm-sticky {
678
  position: sticky !important;
679
  top: 36px !important;
680
  }
 
681
  #query-monitor-main .qm .qm-current,
682
  #query-monitor-main .qm td.qm-has-toggle p,
683
  #query-monitor-main .qm .qm-nonselectsql code,
684
  #query-monitor-main .qm .qm-nonselectsql {
685
  color: #a6a !important;
686
  }
 
687
  #query-monitor-main .qm .qm-info {
688
- color: #777 !important;
689
  }
 
690
  #query-monitor-main .qm .qm-supplemental {
691
  margin-left: 0.75em !important;
692
  margin-right: 0.75em !important;
693
  }
 
694
  #query-monitor-main .qm td.qm-toggled-on .qm-inverse-toggled,
695
  #query-monitor-main .qm td .qm-toggled {
696
  display: none;
697
  }
 
698
  #query-monitor-main .qm button.qm-button,
699
  #query-monitor-main .qm .qm-toggle {
700
  background: #0085ba !important;
701
- border: 1px solid #0073a1 !important;
702
- border-radius: 2px !important;
703
  color: #fff !important;
704
  cursor: pointer !important;
705
  font-weight: normal !important;
706
- text-shadow: 0 -1px 1px #0073a1, 1px 0 1px #0073a1, 0 1px 1px #0073a1, -1px 0 1px #0073a1 !important;
707
  }
 
708
  #query-monitor-main .qm .qm-toggle {
709
  bottom: auto !important;
710
  font-family: Menlo, Monaco, Consolas, monospace !important;
@@ -713,48 +855,76 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
713
  line-height: 16px !important;
714
  padding: 0 !important;
715
  position: absolute !important;
716
- right: 0 !important;
717
  text-align: center !important;
718
- top: 0 !important;
719
  width: 18px !important;
720
  }
 
721
  #query-monitor-main .qm button {
722
  cursor: pointer !important;
723
  }
 
724
  #query-monitor-main .qm button.qm-button {
725
  padding: 4px 10px !important;
726
  }
 
727
  #query-monitor-main .qm .qm-has-inner .qm-toggle {
728
  right: 5px !important;
729
  top: 5px !important;
730
  }
 
731
  #query-monitor-main .qm button.qm-button:hover,
732
- #query-monitor-main .qm button.qm-button:focus,
733
- #query-monitor-main .qm .qm-toggle:focus,
734
  #query-monitor-main .qm .qm-toggle:hover {
735
- background: #0094ce !important;
 
736
  color: #fff !important;
737
  text-decoration: none !important;
738
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739
  #query-monitor-main .qm tbody tr.qm-odd td,
740
  #query-monitor-main .qm tbody tr.qm-odd th {
741
  background: #32373c !important;
742
  }
 
743
  #query-monitor-main .qm-non-tabular .qm-warn,
744
  #query-monitor-main .qm thead tr .qm-warn,
745
  #query-monitor-main .qm tbody tr .qm-warn {
746
- background-color: #800 !important;
747
  color: #fff0f0 !important;
748
  }
 
749
  #query-monitor-main .qm tbody tr th.qm-warn,
750
  #query-monitor-main .qm tbody tr td.qm-warn,
751
  #query-monitor-main .qm tbody tr.qm-warn td,
752
  #query-monitor-main .qm tbody tr.qm-warn th {
753
- background-color: #800 !important;
754
- border-color: #ffd6d6 !important;
755
- box-shadow: inset 0 -1px #ffd6d6 !important;
756
  color: #fff0f0 !important;
757
  }
 
 
 
 
 
 
 
 
758
  #query-monitor-main .qm-non-tabular .qm-warn code,
759
  #query-monitor-main .qm tbody .qm-warn li,
760
  #query-monitor-main .qm tbody .qm-warn .qm-info,
@@ -762,12 +932,14 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
762
  background-color: transparent !important;
763
  color: #fff0f0 !important;
764
  }
 
765
  #query-monitor-main .qm .qm-notice {
766
- background: #3e444a !important;
767
- border: 1px solid #262a2e !important;
768
  margin: 0 0 10px 0 !important;
769
  padding: 10px 20px 0 !important;
770
  }
 
771
  #query-monitor-main .qm .dashicons {
772
  font-size: 16px !important;
773
  height: 16px !important;
@@ -775,21 +947,29 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
775
  transition: none !important;
776
  width: 16px !important;
777
  }
 
778
  #query-monitor-main .qm .qm-dashicons-yes {
779
  background-color: #0a0 !important;
780
  border-radius: 50% !important;
781
  color: #fff !important;
782
  }
 
 
 
 
 
783
  #query-monitor-main .qm tbody tr.qm-hovered th,
784
  #query-monitor-main .qm tbody tr.qm-hovered td,
785
  #query-monitor-main .qm tbody tr:hover th,
786
  #query-monitor-main .qm tbody tr:hover td {
787
- background: #3e444a !important;
788
  }
 
789
  #query-monitor-main .qm thead th.qm-filtered select.qm-filter {
790
  background-color: #57572a !important;
791
  color: #bbc8d4 !important;
792
  }
 
793
  #query-monitor-main .qm tbody tr td.qm-highlight,
794
  #query-monitor-main .qm tbody tr.qm-highlight td {
795
  background-color: #57572a !important;
@@ -797,6 +977,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
797
  box-shadow: inset 0 -1px #660 !important;
798
  color: #bbc8d4 !important;
799
  }
 
800
  #query-monitor-main .qm button.qm-filter-trigger,
801
  #query-monitor-main .qm button.qm-filter-trigger code,
802
  #query-monitor-main .qm tbody .qm-warn a code,
@@ -806,6 +987,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
806
  cursor: pointer !important;
807
  text-decoration: none !important;
808
  }
 
809
  #query-monitor-main .qm button.qm-filter-trigger:after, #query-monitor-main .qm button.qm-filter-trigger:focus, #query-monitor-main .qm button.qm-filter-trigger:hover,
810
  #query-monitor-main .qm button.qm-filter-trigger code:after,
811
  #query-monitor-main .qm button.qm-filter-trigger code:focus,
@@ -822,13 +1004,23 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
822
  color: #4092d2 !important;
823
  text-decoration: underline !important;
824
  }
 
 
 
 
 
 
 
 
 
 
825
  #query-monitor-main .qm a.qm-external-link:after,
826
  #query-monitor-main .qm a.qm-link:after,
827
  #query-monitor-main .qm a.qm-edit-link:after,
828
  #query-monitor-main .qm button.qm-filter-trigger:after {
829
  display: inline-block !important;
830
  font-family: dashicons !important;
831
- font-size: 13px !important;
832
  left: 2px !important;
833
  line-height: 15px !important;
834
  position: relative !important;
@@ -836,6 +1028,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
836
  top: 2px !important;
837
  visibility: hidden !important;
838
  }
 
839
  #query-monitor-main .qm a.qm-external-link:after,
840
  #query-monitor-main .qm a.qm-link:hover:after,
841
  #query-monitor-main .qm a.qm-link:focus:after,
@@ -845,19 +1038,24 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
845
  #query-monitor-main .qm button.qm-filter-trigger:focus:after {
846
  visibility: visible !important;
847
  }
 
848
  #query-monitor-main .qm button.qm-filter-trigger:after {
849
  content: '\f536' !important;
850
  }
 
851
  #query-monitor-main .qm a.qm-edit-link:after {
852
  content: '\f464' !important;
853
  }
 
854
  #query-monitor-main .qm a.qm-external-link:after,
855
  #query-monitor-main .qm a.qm-link:after {
856
  content: '\f504' !important;
857
  }
 
858
  #query-monitor-main #qm-ajax-errors {
859
  display: none;
860
  }
 
861
  #query-monitor-main button,
862
  #query-monitor-main select {
863
  background: none !important;
@@ -866,6 +1064,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
866
  margin: 0 !important;
867
  width: auto !important;
868
  }
 
869
  #query-monitor-main .qm label {
870
  color: #bbc8d4 !important;
871
  cursor: pointer !important;
@@ -874,20 +1073,25 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
874
  font-weight: normal !important;
875
  margin: 0 !important;
876
  }
 
877
  #query-monitor-main .qm thead label {
878
  flex-grow: 1 !important;
879
  }
 
880
  #query-monitor-main .qm .qm-filter-container {
881
  display: flex !important;
882
  }
 
883
  #query-monitor-main .qm .qm-filter-container label {
884
  cursor: default !important;
885
  white-space: nowrap !important;
886
  }
 
887
  #query-monitor-main .qm .qm-filter-container div {
888
  /* Some themes use Select2 etc on all selects. This hides that. */
889
  display: none !important;
890
  }
 
891
  #query-monitor-main .qm select.qm-filter {
892
  -webkit-appearance: menulist !important;
893
  -moz-appearance: menulist !important;
@@ -901,14 +1105,16 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
901
  height: auto !important;
902
  letter-spacing: normal !important;
903
  margin: 0 0 0 5px !important;
904
- max-width: 10em !important;
905
- outline: 1px solid #bbc8d4 !important;
906
  padding: 0 !important;
907
  width: auto !important;
908
  }
 
909
  #query-monitor-main .qm select.qm-filter:hover {
910
  background: #32373c !important;
911
  }
 
912
  #query-monitor-main .qm-hide,
913
  #query-monitor-main .qm-hide-scripts-dependencies,
914
  #query-monitor-main .qm-hide-styles-dependencies,
@@ -924,19 +1130,24 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
924
  #query-monitor-main .qm-hide-component {
925
  display: none !important;
926
  }
 
927
  #query-monitor-main .qm thead th.qm-sortable-column {
928
  cursor: pointer !important;
929
  }
 
930
  #query-monitor-main .qm thead th.qm-sortable-column:hover {
931
  background: #32373c !important;
932
  }
 
933
  #query-monitor-main .qm .qm-sort-heading {
934
  flex-grow: 1 !important;
935
  }
 
936
  #query-monitor-main .qm .qm-sort-controls {
937
  flex-shrink: 0 !important;
938
  text-align: right !important;
939
  }
 
940
  #query-monitor-main .qm .qm-sortable-column .qm-sort-arrow {
941
  color: #ccc !important;
942
  display: block !important;
@@ -946,27 +1157,39 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
946
  margin: 0 !important;
947
  width: 16px !important;
948
  }
 
949
  #query-monitor-main .qm .qm-sortable-column .qm-sort-arrow::before {
950
  content: "\f140" !important;
951
  position: absolute !important;
952
  right: 0 !important;
953
  top: 4px !important;
954
  }
 
955
  #query-monitor-main .qm .qm-sorted-desc .qm-sort-arrow,
956
  #query-monitor-main .qm .qm-sorted-asc .qm-sort-arrow {
957
  color: #bbc8d4 !important;
958
  }
 
959
  #query-monitor-main .qm thead th.qm-sortable-column:hover .qm-sort-arrow {
960
  color: #0073aa !important;
961
  }
 
962
  #query-monitor-main .qm .qm-sortable-column.qm-sorted-asc .qm-sort-arrow::before {
963
  content: "\f142" !important;
964
  }
 
965
  #query-monitor-main .qm button:focus,
966
  #query-monitor-main .qm a:focus,
967
  #query-monitor-main .qm select:focus {
968
- box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8) !important;
 
 
 
 
 
 
969
  }
 
970
  #query-monitor-main .qm-screen-reader-text,
971
  #query-monitor-main .screen-reader-text {
972
  border: 0 !important;
@@ -978,6 +1201,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
978
  position: absolute !important;
979
  width: 1px !important;
980
  }
 
981
  @media screen and (max-width: 782px) {
982
  #query-monitor-main #qm-panel-menu,
983
  #query-monitor-main #qm-title h1.qm-title-heading {
@@ -987,32 +1211,42 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
987
  display: block;
988
  }
989
  }
 
990
  #query-monitor-main [data-qm-state="off"] [data-qm-state-visibility="on"],
991
  #query-monitor-main [data-qm-state="on"] [data-qm-state-visibility="off"] {
992
  display: none;
993
  }
994
- #query-monitor-main.qm-no-js .qm-sort-controls, #query-monitor-main.qm-no-js .qm-toggle, #query-monitor-main.qm-no-js select.qm-filter {
 
 
 
995
  display: none !important;
996
  }
 
997
  #query-monitor-main .qm.qm-debug-bar textarea,
998
  #query-monitor-main .qm.qm-debug-bar pre {
999
- border: 1px solid #bbc8d4 !important;
1000
  margin: 4px 0 !important;
1001
  padding: 10px !important;
1002
  }
 
1003
  #query-monitor-main .qm.qm-debug-bar textarea {
1004
  resize: vertical !important;
1005
  }
 
1006
  #query-monitor-main .qm.qm-debug-bar .left {
1007
  float: left !important;
1008
  }
 
1009
  #query-monitor-main .qm.qm-debug-bar .right {
1010
  float: right !important;
1011
  }
 
1012
  #query-monitor-main .qm.qm-debug-bar h2 {
1013
  font-size: 14px !important;
1014
  margin: 4px 6px 15px !important;
1015
  }
 
1016
  #query-monitor-main .qm.qm-debug-bar h3 {
1017
  clear: none !important;
1018
  float: left !important;
@@ -1023,49 +1257,64 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
1023
  padding: 5px 10px 15px !important;
1024
  text-align: center !important;
1025
  }
 
1026
  #query-monitor-main .qm.qm-debug-bar h3 small {
1027
  font-size: 14px !important;
1028
  }
 
1029
  #query-monitor-main .qm.qm-debug-bar h3 span {
1030
  display: block !important;
1031
  margin-bottom: 8px !important;
1032
  white-space: nowrap !important;
1033
  }
 
1034
  #query-monitor-main .qm.qm-debug-bar h4 {
1035
  font-size: 13px !important;
1036
  margin: 15px 6px 5px !important;
1037
  }
 
1038
  #query-monitor-main .qm.qm-debug-bar .qm-debug-bar-output {
1039
  position: relative !important;
1040
  }
 
1041
  #query-monitor-main .qm.qm-debug-bar .qm-debug-bar-output table {
1042
  margin-bottom: 4px !important;
1043
  margin-top: 4px !important;
1044
  }
 
1045
  #query-monitor-main #debug-menu-target-Debug_Bar_Console {
1046
  min-height: 400px !important;
1047
  }
 
1048
  #query-monitor-main #debug-menu-target-Debug_Bar_Cache_Lookup,
1049
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules,
1050
  #query-monitor-main #debug-menu-target-Debug_Bar_Widgets {
1051
  margin: 4px 6px !important;
1052
  }
 
1053
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules_Panel .filterui,
1054
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules_Panel .dbrr {
1055
  margin: 0 !important;
1056
  }
 
1057
  #query-monitor-main.qm-broken #qm-title {
1058
  cursor: default !important;
1059
  }
1060
- #query-monitor-main #qm-broken, #query-monitor-main.qm-broken .qm-title-button {
 
 
1061
  display: none !important;
1062
  }
1063
- #query-monitor-main.qm-broken #qm-broken, #query-monitor-main.qm-broken .qm {
 
 
1064
  display: block !important;
1065
  }
 
1066
  #query-monitor-main.qm-broken .qm {
1067
  margin-bottom: 50px !important;
1068
  }
 
1069
  #query-monitor-main.qm-broken #qm-broken h2 {
1070
  padding: 20px !important;
1071
  }
6
  #wpadminbar .quicklinks .menupop ul li.qm-true > a {
7
  color: #8c8 !important;
8
  }
9
+
10
  #wpadminbar .quicklinks .menupop ul li.qm-true > a:focus, #wpadminbar .quicklinks .menupop ul li.qm-true > a:hover {
11
+ color: #47a747 !important;
12
  }
13
+
14
  #wpadminbar .qm-alert {
15
  background-color: #f60;
16
  }
17
+
18
+ #wpadminbar .qm-alert:hover {
19
+ background-color: #e65c00;
20
+ }
21
+
22
+ #wpadminbar #wp-admin-bar-query-monitor-stricts a,
23
+ #wpadminbar #wp-admin-bar-query-monitor-deprecateds a,
24
  #wpadminbar #wp-admin-bar-query-monitor-notices a,
25
+ #wpadminbar .qm-strict,
26
+ #wpadminbar .qm-deprecated,
27
  #wpadminbar .qm-notice {
28
  background-color: #740;
29
  }
30
+
 
 
 
 
 
 
 
31
  #wpadminbar #wp-admin-bar-query-monitor-expensive a,
32
  #wpadminbar .qm-expensive {
33
  background-color: #b60;
34
  }
35
+
36
+ #wpadminbar #wp-admin-bar-query-monitor-expensive a:hover,
37
+ #wpadminbar .qm-expensive:hover {
38
+ background-color: #915700;
39
+ }
40
+
41
  #wpadminbar #wp-admin-bar-query-monitor-logger-warning a,
42
  #wpadminbar #wp-admin-bar-query-monitor-warnings a,
43
+ #wpadminbar #wp-admin-bar-query-monitor-errors a,
44
+ #wpadminbar .qm-error,
45
  #wpadminbar .qm-warning {
46
  background-color: #c00;
47
  }
48
+
49
  #wpadminbar #wp-admin-bar-query-monitor-logger-warning a:hover,
50
  #wpadminbar #wp-admin-bar-query-monitor-warnings a:hover,
51
+ #wpadminbar #wp-admin-bar-query-monitor-errors a:hover,
52
+ #wpadminbar .qm-error:hover,
53
  #wpadminbar .qm-warning:hover {
54
+ background-color: #b30000;
 
 
 
 
 
55
  }
56
+
57
  #wpadminbar #wp-admin-bar-query-monitor .ab-icon {
58
  color: #aaa !important;
59
  display: none !important;
61
  padding: 0 10px !important;
62
  width: auto !important;
63
  }
64
+
65
  @media screen and (max-width: 782px) {
66
  #wpadminbar #wp-admin-bar-query-monitor .ab-icon {
67
  display: block !important;
78
  }
79
 
80
  body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover):not(.hover) .ab-label,
81
+ #wp-admin-bar-query-monitor-default .qm-alert a,
82
+ #wp-admin-bar-query-monitor-default .qm-error a,
83
+ #wp-admin-bar-query-monitor-default .qm-warning a,
84
  #wp-admin-bar-query-monitor-deprecateds a,
85
  #wp-admin-bar-query-monitor-stricts a,
86
  #wp-admin-bar-query-monitor-notices a,
110
  #query-monitor-main dt,
111
  #query-monitor-main dd,
112
  #query-monitor-main button,
113
+ #query-monitor-main caption,
114
  #query-monitor-main label,
115
  #query-monitor-main select,
116
  #query-monitor-main table,
120
  #query-monitor-main ol,
121
  #query-monitor-main li,
122
  #query-monitor-main code,
123
+ #query-monitor-main pre,
124
  #query-monitor-main a,
125
  #query-monitor-main h1,
126
  #query-monitor-main h2,
147
  letter-spacing: normal !important;
148
  line-height: 18px !important;
149
  margin: 0 !important;
150
+ min-height: auto !important;
151
  outline: none !important;
152
  padding: 0 !important;
153
  text-align: left !important;
161
  word-break: normal !important;
162
  word-wrap: normal !important;
163
  }
164
+
165
  #query-monitor-main::before, #query-monitor-main::after,
166
  #query-monitor-main dl::before,
167
  #query-monitor-main dl::after,
171
  #query-monitor-main dd::after,
172
  #query-monitor-main button::before,
173
  #query-monitor-main button::after,
174
+ #query-monitor-main caption::before,
175
+ #query-monitor-main caption::after,
176
  #query-monitor-main label::before,
177
  #query-monitor-main label::after,
178
  #query-monitor-main select::before,
191
  #query-monitor-main li::after,
192
  #query-monitor-main code::before,
193
  #query-monitor-main code::after,
194
+ #query-monitor-main pre::before,
195
+ #query-monitor-main pre::after,
196
  #query-monitor-main a::before,
197
  #query-monitor-main a::after,
198
  #query-monitor-main h1::before,
215
  #query-monitor-main p::after {
216
  display: none !important;
217
  }
218
+
219
  #query-monitor-main {
220
  background: #23282d !important;
221
+ border-top: 1px solid #50626f !important;
222
  bottom: 0 !important;
223
  direction: ltr !important;
224
  display: none;
229
  text-align: left !important;
230
  z-index: 99998 !important;
231
  }
232
+
233
  #query-monitor-main ::selection {
234
  background-color: #B9D6FB !important;
235
  color: #bbc8d4 !important;
236
  }
237
+
238
  #query-monitor-main strong,
239
  #query-monitor-main b {
240
  font-weight: bold !important;
241
  }
242
+
243
  #query-monitor-main em,
244
  #query-monitor-main i {
245
  font-style: italic !important;
246
  }
247
+
248
  #query-monitor-main.qm-show, #query-monitor-main.qm-peek {
249
  display: flex;
250
  flex-direction: column !important;
251
  height: 27px;
252
  }
253
+
254
  #query-monitor-main.qm-show {
255
  height: 40%;
256
  width: 40%;
257
  }
258
+
259
  #query-monitor-main:not(.qm-show-right) {
260
  width: 100% !important;
261
  }
262
+
263
  #query-monitor-main.qm-show-right {
264
+ height: calc( 100vh - 32px) !important;
265
  top: 32px !important;
266
  left: unset !important;
267
  border-top: 0 !important;
268
+ border-left: 1px solid #50626f !important;
269
  }
270
+
271
  #query-monitor-main.qm-show-right #qm-panel-menu,
272
  #query-monitor-main.qm-show-right #qm-title h1.qm-title-heading {
273
  display: none;
274
  }
275
+
276
  #query-monitor-main.qm-show-right #qm-title div.qm-title-heading {
277
  display: block;
278
  }
279
+
280
  #query-monitor-main.qm-show-right #qm-title {
281
  cursor: default !important;
282
  }
283
+
284
  #query-monitor-main.qm-show-right #qm-side-resizer {
285
  background: transparent !important;
286
  cursor: ew-resize !important;
292
  width: 4px !important;
293
  z-index: 2 !important;
294
  }
295
+
296
  #query-monitor-main.qm-show-right.qm-peek {
297
  height: 100vh !important;
298
  top: 0 !important;
299
  }
300
+
301
  #query-monitor-main #qm-wrapper {
302
  display: flex;
303
  flex-grow: 1 !important;
304
  /* Fix nested scrolling in Firefox. See https://bugzilla.mozilla.org/show_bug.cgi?id=1043520: */
305
  min-height: 0;
306
  }
307
+
308
  #query-monitor-main #qm-title {
309
  align-items: center !important;
310
  background: #32373c !important;
311
+ border-bottom: 1px solid #50626f !important;
312
  cursor: ns-resize !important;
313
  display: flex !important;
314
  flex-shrink: 0 !important;
319
  -webkit-user-select: none !important;
320
  user-select: none !important;
321
  }
322
+
323
  #query-monitor-main #qm-title .qm-title-heading {
324
  border-right: 1px solid #bbb !important;
325
  flex-grow: 1 !important;
326
  margin-right: 6px !important;
327
  }
328
+
329
  #query-monitor-main #qm-title div.qm-title-heading {
330
  display: none;
331
  }
332
+
333
  #query-monitor-main #qm-title .qm-title-button {
334
  flex-shrink: 0 !important;
335
  }
336
+
337
  #query-monitor-main #qm-title .dashicons {
338
  transition: none !important;
339
  }
340
+
341
  #query-monitor-main #qm-title .qm-button-container-close {
342
  margin-right: 10px !important;
343
  }
344
+
345
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
346
  margin: 3px 0 3px !important;
347
  }
348
+
349
  @media screen and (max-width: 960px) {
350
  #query-monitor-main #qm-title .qm-button-container-position {
351
  display: none !important;
352
  }
353
  }
354
+
355
  #query-monitor-main #qm-title button {
356
  background: transparent !important;
357
  color: #bbc8d4 !important;
361
  min-width: auto !important;
362
  padding: 0px 4px !important;
363
  }
364
+
365
+ #query-monitor-main #qm-title button:focus *,
366
+ #query-monitor-main #qm-title button:hover *,
367
  #query-monitor-main #qm-title button:focus,
368
  #query-monitor-main #qm-title button:hover {
369
  background: #bbc8d4 !important;
370
  color: #32373c !important;
371
  }
372
+
373
+ #query-monitor-main #qm-title button:active *,
374
  #query-monitor-main #qm-title button:active {
375
  background: #ccc !important;
376
  }
377
+
378
  #query-monitor-main #qm-title button.qm-button-active {
379
  color: #3879d9 !important;
380
  }
381
+
382
  #query-monitor-main #qm-title .qm-button-container-settings .dashicons {
383
  font-size: 17px !important;
384
  margin: 4px 0 2px !important;
385
  }
386
+
387
  #query-monitor-main #qm-title .qm-button-container-position .dashicons {
388
  font-size: 15px !important;
389
  margin: 2px -1px 3px 4px !important;
390
  transform: scaleX(-1) rotate(90deg) !important;
391
  }
392
+
393
  #query-monitor-main.qm-show-right #qm-title .qm-button-container-position .dashicons {
394
  margin: 4px 1px 0px 1px !important;
395
  transform: none !important;
396
  }
397
+
398
  #query-monitor-main .qm {
399
  display: none !important;
400
  }
401
+
402
  #query-monitor-main #qm-panel-menu {
403
  background: #23282d !important;
404
  flex-shrink: 0 !important;
406
  overscroll-behavior: contain !important;
407
  height: auto !important;
408
  }
409
+
410
  #query-monitor-main #qm-panel-menu ul {
411
  display: block !important;
412
  list-style: none !important;
415
  width: auto !important;
416
  height: auto !important;
417
  }
418
+
419
  #query-monitor-main #qm-panel-menu li {
420
  display: list-item !important;
421
  margin: 0 !important;
422
  padding: 0 !important;
423
  height: auto !important;
424
  }
425
+
426
  #query-monitor-main #qm-panel-menu li button {
427
  background: #23282d !important;
428
  border-bottom: 1px solid #32373c !important;
429
+ border-right: 1px solid #50626f !important;
430
  color: #bbc8d4 !important;
431
  cursor: pointer !important;
432
  display: block !important;
435
  text-decoration: none !important;
436
  width: 100% !important;
437
  }
438
+
439
  #query-monitor-main #qm-panel-menu li button:focus,
440
  #query-monitor-main #qm-panel-menu li button:hover {
441
  background: #3e444a !important;
442
  color: #bbc8d4 !important;
443
  }
444
+
445
  #query-monitor-main #qm-panel-menu li button:focus {
446
  text-decoration: underline !important;
447
  }
448
+
449
+ #query-monitor-main #qm-panel-menu li button:active {
450
+ text-decoration: none !important;
451
+ background: #0073aa !important;
452
+ color: #fff !important;
453
+ text-shadow: 0 -1px 1px #006291, 1px 0 1px #006291, 0 1px 1px #006291, -1px 0 1px #006291 !important;
454
+ }
455
+
456
  #query-monitor-main #qm-panel-menu li.qm-current-menu button {
457
  background: #32373c !important;
458
  color: #bbc8d4 !important;
459
  }
460
+
461
  #query-monitor-main #qm-panel-menu li.qm-current-menu button:focus {
462
  background: #3e444a !important;
463
  color: #bbc8d4 !important;
464
  }
465
+
466
  #query-monitor-main #qm-panel-menu li.qm-current-menu button:hover {
467
  background: #3e444a !important;
468
  color: #bbc8d4 !important;
469
  }
470
+
471
  #query-monitor-main #qm-panel-menu li li button::before {
472
  content: "\2514" !important;
473
  display: inline-block !important;
474
  margin-right: 5px !important;
475
  }
476
+
477
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"] {
478
  background: #0073aa !important;
479
  color: #fff !important;
480
  text-shadow: 0 -1px 1px #006291, 1px 0 1px #006291, 0 1px 1px #006291, -1px 0 1px #006291 !important;
481
  }
482
+
483
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:focus {
484
  background: #0084c4 !important;
485
  color: #fff !important;
486
  }
487
+
488
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:hover {
489
  background: #0073aa !important;
490
  color: #fff !important;
491
  }
492
+
493
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:after {
494
  border: solid 8px transparent;
495
  border-right-color: #23282d;
503
  top: 50%;
504
  width: 0;
505
  }
506
+
507
  #query-monitor-main #qm-panels {
508
  flex-grow: 1 !important;
509
  overflow-y: scroll !important;
510
  overscroll-behavior: contain !important;
511
  }
512
+
513
  #query-monitor-main .qm.qm-panel-show {
514
  display: block !important;
515
  }
516
+
517
  #query-monitor-main .qm:focus {
518
  outline: 0 !important;
519
  /* @TODO might not need this any more */
520
  }
521
+
522
  #query-monitor-main .qm-boxed {
523
  display: flex !important;
524
  flex-wrap: wrap !important;
525
  }
526
+
527
  #query-monitor-main .qm-boxed:not(#qm-broken) + .qm-boxed {
528
+ border-top: 1px solid #50626f !important;
529
  padding-top: 10px !important;
530
  }
531
+
532
  #query-monitor-main .qm-boxed-wrap {
533
  flex-wrap: wrap !important;
534
  }
535
+
536
  #query-monitor-main .qm .qm-none {
537
  margin: 2em !important;
538
  }
539
+
540
  #query-monitor-main .qm .qm-none p {
541
  font-style: italic !important;
542
  text-align: center !important;
543
  }
544
+
545
  #query-monitor-main .qm table {
546
  border: none !important;
 
547
  border-collapse: collapse !important;
548
+ box-shadow: 0px 1px 0px 0px #50626f !important;
549
  color: #bbc8d4 !important;
550
  margin: 0 !important;
551
  table-layout: auto !important;
552
  width: 100% !important;
553
  }
554
+
555
  #query-monitor-main .qm table + table {
556
  border-top: 1px solid #23282d !important;
557
  margin-top: 5px !important;
558
  }
559
+
560
  #query-monitor-main .qm tr {
561
  border: none !important;
562
  }
563
+
564
  #query-monitor-main .qm tbody th,
565
  #query-monitor-main .qm tbody td,
566
  #query-monitor-main .qm tfoot th,
567
  #query-monitor-main .qm tfoot td {
568
  border: 1px solid #23282d !important;
569
  padding: 5px 5px 4px 5px !important;
570
+ vertical-align: top !important;
571
  }
572
+
573
  #query-monitor-main .qm tbody th,
574
  #query-monitor-main .qm tbody td {
575
  border-bottom: none !important;
576
  border-top: none !important;
577
  }
578
+
579
  #query-monitor-main .qm thead th {
580
  background: #32373c !important;
581
  border: 1px solid #23282d !important;
587
  top: 0 !important;
588
  z-index: 1 !important;
589
  }
590
+
591
+ #query-monitor-main .qm thead th,
592
+ #query-monitor-main .qm thead td {
593
+ vertical-align: top !important;
594
+ }
595
+
596
  #query-monitor-main .qm thead .qm-th {
597
  display: flex !important;
598
  }
599
+
600
  #query-monitor-main .qm tfoot tr td,
601
  #query-monitor-main .qm tfoot tr th {
602
  background: #32373c !important;
603
+ border: none !important;
 
604
  bottom: 0 !important;
605
  box-shadow: inset 0px 1px 0px #23282d !important;
606
  position: -webkit-sticky !important;
607
  position: sticky !important;
608
  }
609
+
610
  #query-monitor-main .qm th:first-child,
611
  #query-monitor-main .qm td:first-child {
612
  border-left: none !important;
613
  }
614
+
615
  #query-monitor-main .qm th:last-child,
616
  #query-monitor-main .qm td:last-child {
617
  border-right: none !important;
618
  }
619
+
620
  #query-monitor-main .qm tfoot td.qm-num,
621
  #query-monitor-main .qm tfoot th.qm-num,
622
  #query-monitor-main .qm thead td.qm-num,
623
  #query-monitor-main .qm thead th.qm-num {
624
  width: 5.5em !important;
625
  }
626
+
627
  #query-monitor-main .qm th.qm-num,
628
  #query-monitor-main .qm td.qm-num {
629
  text-align: right !important;
630
  }
631
+
632
  #query-monitor-main .qm td.qm-num {
633
  font-family: Menlo, Monaco, Consolas, monospace !important;
634
  font-size: 11px !important;
635
  line-height: 18px !important;
636
  }
637
+
638
  #query-monitor-main .qm td.qm-row-sql {
639
  min-width: 25em !important;
640
  }
641
+
642
+ #query-monitor-main .qm td.qm-row-block-attrs,
643
  #query-monitor-main .qm td.qm-row-block-html {
644
  max-width: 40em !important;
645
  }
646
+
647
  #query-monitor-main .qm tr.qm-warn td.qm-col-status,
648
  #query-monitor-main .qm td.qm-url,
649
  #query-monitor-main .qm th.qm-col-message,
650
  #query-monitor-main .qm td.qm-row-component {
651
  min-width: 15em !important;
652
  }
653
+
654
+ #query-monitor-main .qm td.qm-has-toggle {
655
+ padding-right: 24px !important;
656
  position: relative !important;
657
  }
658
+
659
  #query-monitor-main .qm td.qm-has-toggle:not(.qm-toggled-on) .qm-supplemental {
660
  display: none;
661
  }
662
+
663
  #query-monitor-main .qm .qm-inner-toggle {
664
  padding: 4px 6px !important;
665
  }
666
+
667
  #query-monitor-main .qm .qm-has-inner .qm-toggled > table {
668
  border-bottom: none !important;
669
  border-top: 1px solid #23282d !important;
670
  }
671
+
672
  #query-monitor-main .qm td.qm-has-inner .qm-toggler,
673
  #query-monitor-main .qm td.qm-has-inner {
674
  padding: 0 !important;
675
  }
676
+
677
  #query-monitor-main .qm caption h2 {
678
  font-size: 14px !important;
679
  margin: 20px !important;
680
  }
681
+
682
  #query-monitor-main .qm-concerns table {
683
  border-top: 1px solid #23282d !important;
684
  margin-bottom: 20px !important;
685
  }
686
+
687
  #query-monitor-main .qm-non-tabular {
688
  padding: 10px 20px !important;
689
  }
690
+
691
  #query-monitor-main .qm-non-tabular h3 {
692
  font-size: 14px !important;
693
  margin: 0 0 15px 0 !important;
694
  }
695
+
696
  #query-monitor-main .qm-non-tabular h4 {
697
  font-size: 12px !important;
698
  margin: 20px 0 10px !important;
699
  }
700
+
701
  #query-monitor-main .qm-non-tabular p {
702
  margin-bottom: 10px !important;
703
  }
704
+
705
  #query-monitor-main .qm-non-tabular dl {
706
  display: flex !important;
707
  flex-wrap: wrap !important;
708
  max-width: 60em !important;
709
  }
710
+
711
  #query-monitor-main .qm-non-tabular dt {
712
+ border-top: 1px solid #50626f !important;
713
  flex-grow: 0;
714
  flex: 1 0 16em;
715
  padding: 10px 10px 10px 0 !important;
716
  }
717
+
718
  #query-monitor-main .qm-non-tabular dd {
719
+ border-top: 1px solid #50626f !important;
720
  flex: 1 0 calc(100% - 10px - 16em);
721
  padding: 10px 0 !important;
722
  }
723
+
724
  #query-monitor-main .qm-non-tabular section,
725
  #query-monitor-main .qm-non-tabular .qm-section {
726
  margin: 0 0 30px 0 !important;
727
  }
728
+
729
  #query-monitor-main .qm-non-tabular .qm-boxed section,
730
  #query-monitor-main .qm-non-tabular .qm-boxed .qm-section {
731
+ border-right: 1px solid #50626f !important;
732
  margin: 0 20px 10px 0 !important;
733
  padding: 10px 20px 10px 0 !important;
734
  }
735
+
736
  #query-monitor-main .qm-non-tabular .qm-boxed section:last-child,
737
  #query-monitor-main .qm-non-tabular .qm-boxed .qm-section:last-child {
738
  border-right: none !important;
739
  margin-right: 0 !important;
740
  padding-right: 20px !important;
741
  }
742
+
743
  #query-monitor-main .qm-non-tabular table {
744
  border-bottom-color: #23282d !important;
745
  }
746
+
747
  #query-monitor-main #qm-conditionals li {
748
  display: inline-block !important;
749
  margin: 0 20px 5px 0 !important;
750
  }
751
+
752
  #query-monitor-main .qm ol,
753
  #query-monitor-main .qm ul {
754
  list-style: none !important;
755
  }
756
+
757
  #query-monitor-main .qm li {
758
  display: list-item !important;
759
  list-style: none !important;
760
  }
761
+
762
  #query-monitor-main .qm li::before {
763
  content: '' !important;
764
  }
765
+
766
  #query-monitor-main .qm code,
767
  #query-monitor-main .qm pre {
768
  font-family: Menlo, Monaco, Consolas, monospace !important;
769
  font-size: 11px !important;
770
  line-height: 18px !important;
771
  }
772
+
773
  #query-monitor-main .qm pre {
774
  background: transparent !important;
775
  height: auto !important;
777
  padding: 0 !important;
778
  width: auto !important;
779
  }
780
+
781
  #query-monitor-main .qm .qm-true code,
782
  #query-monitor-main .qm p.qm-true,
783
  #query-monitor-main .qm span.qm-true,
784
  #query-monitor-main .qm td.qm-true {
785
+ color: #282 !important;
786
  }
787
+
788
  #query-monitor-main .qm .qm-false code,
789
  #query-monitor-main .qm span.qm-false,
790
  #query-monitor-main .qm td.qm-false {
791
  color: #999 !important;
792
  }
793
+
794
  #query-monitor-main .qm .qm-num,
795
  #query-monitor-main .qm code,
796
  #query-monitor-main .qm .qm-nowrap {
797
  white-space: nowrap !important;
798
  }
799
+
800
  #query-monitor-main .qm .qm-wrap code,
801
  #query-monitor-main .qm .qm-wrap {
802
  white-space: normal !important;
803
  word-break: break-all !important;
804
  word-wrap: break-word !important;
805
  }
806
+
807
  #query-monitor-main .qm .qm-pre-wrap code {
808
  white-space: pre-wrap !important;
809
  word-break: break-all !important;
810
  word-wrap: break-word !important;
811
  }
812
+
813
  #query-monitor-main .qm .qm-sticky {
814
  position: sticky !important;
815
  top: 36px !important;
816
  }
817
+
818
  #query-monitor-main .qm .qm-current,
819
  #query-monitor-main .qm td.qm-has-toggle p,
820
  #query-monitor-main .qm .qm-nonselectsql code,
821
  #query-monitor-main .qm .qm-nonselectsql {
822
  color: #a6a !important;
823
  }
824
+
825
  #query-monitor-main .qm .qm-info {
826
+ color: #666 !important;
827
  }
828
+
829
  #query-monitor-main .qm .qm-supplemental {
830
  margin-left: 0.75em !important;
831
  margin-right: 0.75em !important;
832
  }
833
+
834
  #query-monitor-main .qm td.qm-toggled-on .qm-inverse-toggled,
835
  #query-monitor-main .qm td .qm-toggled {
836
  display: none;
837
  }
838
+
839
  #query-monitor-main .qm button.qm-button,
840
  #query-monitor-main .qm .qm-toggle {
841
  background: #0085ba !important;
842
+ border: 1px solid #0085ba !important;
843
+ border-radius: 3px !important;
844
  color: #fff !important;
845
  cursor: pointer !important;
846
  font-weight: normal !important;
847
+ text-shadow: none !important;
848
  }
849
+
850
  #query-monitor-main .qm .qm-toggle {
851
  bottom: auto !important;
852
  font-family: Menlo, Monaco, Consolas, monospace !important;
855
  line-height: 16px !important;
856
  padding: 0 !important;
857
  position: absolute !important;
858
+ right: 5px !important;
859
  text-align: center !important;
860
+ top: 5px !important;
861
  width: 18px !important;
862
  }
863
+
864
  #query-monitor-main .qm button {
865
  cursor: pointer !important;
866
  }
867
+
868
  #query-monitor-main .qm button.qm-button {
869
  padding: 4px 10px !important;
870
  }
871
+
872
  #query-monitor-main .qm .qm-has-inner .qm-toggle {
873
  right: 5px !important;
874
  top: 5px !important;
875
  }
876
+
877
  #query-monitor-main .qm button.qm-button:hover,
 
 
878
  #query-monitor-main .qm .qm-toggle:hover {
879
+ background: #007aab !important;
880
+ border-color: #007aab !important;
881
  color: #fff !important;
882
  text-decoration: none !important;
883
  }
884
+
885
+ #query-monitor-main .qm button.qm-button:focus,
886
+ #query-monitor-main .qm .qm-toggle:focus {
887
+ background: #007aab !important;
888
+ border-color: #007aab !important;
889
+ color: #fff !important;
890
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px #007aab !important;
891
+ }
892
+
893
+ #query-monitor-main .qm button.qm-button:active,
894
+ #query-monitor-main .qm .qm-toggle:active {
895
+ background: #006f9b !important;
896
+ border-color: #006f9b !important;
897
+ color: #fff !important;
898
+ box-shadow: none !important;
899
+ }
900
+
901
  #query-monitor-main .qm tbody tr.qm-odd td,
902
  #query-monitor-main .qm tbody tr.qm-odd th {
903
  background: #32373c !important;
904
  }
905
+
906
  #query-monitor-main .qm-non-tabular .qm-warn,
907
  #query-monitor-main .qm thead tr .qm-warn,
908
  #query-monitor-main .qm tbody tr .qm-warn {
909
+ background-color: #522 !important;
910
  color: #fff0f0 !important;
911
  }
912
+
913
  #query-monitor-main .qm tbody tr th.qm-warn,
914
  #query-monitor-main .qm tbody tr td.qm-warn,
915
  #query-monitor-main .qm tbody tr.qm-warn td,
916
  #query-monitor-main .qm tbody tr.qm-warn th {
917
+ background-color: #522 !important;
 
 
918
  color: #fff0f0 !important;
919
  }
920
+
921
+ #query-monitor-main .qm tbody tr.qm-odd th.qm-warn,
922
+ #query-monitor-main .qm tbody tr.qm-odd td.qm-warn,
923
+ #query-monitor-main .qm tbody tr.qm-odd.qm-warn td,
924
+ #query-monitor-main .qm tbody tr.qm-odd.qm-warn th {
925
+ background-color: #502020 !important;
926
+ }
927
+
928
  #query-monitor-main .qm-non-tabular .qm-warn code,
929
  #query-monitor-main .qm tbody .qm-warn li,
930
  #query-monitor-main .qm tbody .qm-warn .qm-info,
932
  background-color: transparent !important;
933
  color: #fff0f0 !important;
934
  }
935
+
936
  #query-monitor-main .qm .qm-notice {
937
+ background: #32373c !important;
938
+ border: 1px solid #1b1e20 !important;
939
  margin: 0 0 10px 0 !important;
940
  padding: 10px 20px 0 !important;
941
  }
942
+
943
  #query-monitor-main .qm .dashicons {
944
  font-size: 16px !important;
945
  height: 16px !important;
947
  transition: none !important;
948
  width: 16px !important;
949
  }
950
+
951
  #query-monitor-main .qm .qm-dashicons-yes {
952
  background-color: #0a0 !important;
953
  border-radius: 50% !important;
954
  color: #fff !important;
955
  }
956
+
957
+ #query-monitor-main .qm tbody tr.qm-odd.qm-hovered th,
958
+ #query-monitor-main .qm tbody tr.qm-odd.qm-hovered td,
959
+ #query-monitor-main .qm tbody tr.qm-odd:hover th,
960
+ #query-monitor-main .qm tbody tr.qm-odd:hover td,
961
  #query-monitor-main .qm tbody tr.qm-hovered th,
962
  #query-monitor-main .qm tbody tr.qm-hovered td,
963
  #query-monitor-main .qm tbody tr:hover th,
964
  #query-monitor-main .qm tbody tr:hover td {
965
+ background: #373c42 !important;
966
  }
967
+
968
  #query-monitor-main .qm thead th.qm-filtered select.qm-filter {
969
  background-color: #57572a !important;
970
  color: #bbc8d4 !important;
971
  }
972
+
973
  #query-monitor-main .qm tbody tr td.qm-highlight,
974
  #query-monitor-main .qm tbody tr.qm-highlight td {
975
  background-color: #57572a !important;
977
  box-shadow: inset 0 -1px #660 !important;
978
  color: #bbc8d4 !important;
979
  }
980
+
981
  #query-monitor-main .qm button.qm-filter-trigger,
982
  #query-monitor-main .qm button.qm-filter-trigger code,
983
  #query-monitor-main .qm tbody .qm-warn a code,
987
  cursor: pointer !important;
988
  text-decoration: none !important;
989
  }
990
+
991
  #query-monitor-main .qm button.qm-filter-trigger:after, #query-monitor-main .qm button.qm-filter-trigger:focus, #query-monitor-main .qm button.qm-filter-trigger:hover,
992
  #query-monitor-main .qm button.qm-filter-trigger code:after,
993
  #query-monitor-main .qm button.qm-filter-trigger code:focus,
1004
  color: #4092d2 !important;
1005
  text-decoration: underline !important;
1006
  }
1007
+
1008
+ #query-monitor-main .qm button.qm-filter-trigger:active,
1009
+ #query-monitor-main .qm button.qm-filter-trigger code:active,
1010
+ #query-monitor-main .qm tbody .qm-warn a code:active,
1011
+ #query-monitor-main .qm a code:active,
1012
+ #query-monitor-main .qm a:active {
1013
+ color: #69aadc !important;
1014
+ text-decoration: underline !important;
1015
+ }
1016
+
1017
  #query-monitor-main .qm a.qm-external-link:after,
1018
  #query-monitor-main .qm a.qm-link:after,
1019
  #query-monitor-main .qm a.qm-edit-link:after,
1020
  #query-monitor-main .qm button.qm-filter-trigger:after {
1021
  display: inline-block !important;
1022
  font-family: dashicons !important;
1023
+ font-size: 14px !important;
1024
  left: 2px !important;
1025
  line-height: 15px !important;
1026
  position: relative !important;
1028
  top: 2px !important;
1029
  visibility: hidden !important;
1030
  }
1031
+
1032
  #query-monitor-main .qm a.qm-external-link:after,
1033
  #query-monitor-main .qm a.qm-link:hover:after,
1034
  #query-monitor-main .qm a.qm-link:focus:after,
1038
  #query-monitor-main .qm button.qm-filter-trigger:focus:after {
1039
  visibility: visible !important;
1040
  }
1041
+
1042
  #query-monitor-main .qm button.qm-filter-trigger:after {
1043
  content: '\f536' !important;
1044
  }
1045
+
1046
  #query-monitor-main .qm a.qm-edit-link:after {
1047
  content: '\f464' !important;
1048
  }
1049
+
1050
  #query-monitor-main .qm a.qm-external-link:after,
1051
  #query-monitor-main .qm a.qm-link:after {
1052
  content: '\f504' !important;
1053
  }
1054
+
1055
  #query-monitor-main #qm-ajax-errors {
1056
  display: none;
1057
  }
1058
+
1059
  #query-monitor-main button,
1060
  #query-monitor-main select {
1061
  background: none !important;
1064
  margin: 0 !important;
1065
  width: auto !important;
1066
  }
1067
+
1068
  #query-monitor-main .qm label {
1069
  color: #bbc8d4 !important;
1070
  cursor: pointer !important;
1073
  font-weight: normal !important;
1074
  margin: 0 !important;
1075
  }
1076
+
1077
  #query-monitor-main .qm thead label {
1078
  flex-grow: 1 !important;
1079
  }
1080
+
1081
  #query-monitor-main .qm .qm-filter-container {
1082
  display: flex !important;
1083
  }
1084
+
1085
  #query-monitor-main .qm .qm-filter-container label {
1086
  cursor: default !important;
1087
  white-space: nowrap !important;
1088
  }
1089
+
1090
  #query-monitor-main .qm .qm-filter-container div {
1091
  /* Some themes use Select2 etc on all selects. This hides that. */
1092
  display: none !important;
1093
  }
1094
+
1095
  #query-monitor-main .qm select.qm-filter {
1096
  -webkit-appearance: menulist !important;
1097
  -moz-appearance: menulist !important;
1105
  height: auto !important;
1106
  letter-spacing: normal !important;
1107
  margin: 0 0 0 5px !important;
1108
+ max-width: 12em !important;
1109
+ outline: 1px solid #50626f !important;
1110
  padding: 0 !important;
1111
  width: auto !important;
1112
  }
1113
+
1114
  #query-monitor-main .qm select.qm-filter:hover {
1115
  background: #32373c !important;
1116
  }
1117
+
1118
  #query-monitor-main .qm-hide,
1119
  #query-monitor-main .qm-hide-scripts-dependencies,
1120
  #query-monitor-main .qm-hide-styles-dependencies,
1130
  #query-monitor-main .qm-hide-component {
1131
  display: none !important;
1132
  }
1133
+
1134
  #query-monitor-main .qm thead th.qm-sortable-column {
1135
  cursor: pointer !important;
1136
  }
1137
+
1138
  #query-monitor-main .qm thead th.qm-sortable-column:hover {
1139
  background: #32373c !important;
1140
  }
1141
+
1142
  #query-monitor-main .qm .qm-sort-heading {
1143
  flex-grow: 1 !important;
1144
  }
1145
+
1146
  #query-monitor-main .qm .qm-sort-controls {
1147
  flex-shrink: 0 !important;
1148
  text-align: right !important;
1149
  }
1150
+
1151
  #query-monitor-main .qm .qm-sortable-column .qm-sort-arrow {
1152
  color: #ccc !important;
1153
  display: block !important;
1157
  margin: 0 !important;
1158
  width: 16px !important;
1159
  }
1160
+
1161
  #query-monitor-main .qm .qm-sortable-column .qm-sort-arrow::before {
1162
  content: "\f140" !important;
1163
  position: absolute !important;
1164
  right: 0 !important;
1165
  top: 4px !important;
1166
  }
1167
+
1168
  #query-monitor-main .qm .qm-sorted-desc .qm-sort-arrow,
1169
  #query-monitor-main .qm .qm-sorted-asc .qm-sort-arrow {
1170
  color: #bbc8d4 !important;
1171
  }
1172
+
1173
  #query-monitor-main .qm thead th.qm-sortable-column:hover .qm-sort-arrow {
1174
  color: #0073aa !important;
1175
  }
1176
+
1177
  #query-monitor-main .qm .qm-sortable-column.qm-sorted-asc .qm-sort-arrow::before {
1178
  content: "\f142" !important;
1179
  }
1180
+
1181
  #query-monitor-main .qm button:focus,
1182
  #query-monitor-main .qm a:focus,
1183
  #query-monitor-main .qm select:focus {
1184
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px #007aab !important;
1185
+ }
1186
+
1187
+ #query-monitor-main .qm button:active,
1188
+ #query-monitor-main .qm a:active,
1189
+ #query-monitor-main .qm select:active {
1190
+ box-shadow: none !important;
1191
  }
1192
+
1193
  #query-monitor-main .qm-screen-reader-text,
1194
  #query-monitor-main .screen-reader-text {
1195
  border: 0 !important;
1201
  position: absolute !important;
1202
  width: 1px !important;
1203
  }
1204
+
1205
  @media screen and (max-width: 782px) {
1206
  #query-monitor-main #qm-panel-menu,
1207
  #query-monitor-main #qm-title h1.qm-title-heading {
1211
  display: block;
1212
  }
1213
  }
1214
+
1215
  #query-monitor-main [data-qm-state="off"] [data-qm-state-visibility="on"],
1216
  #query-monitor-main [data-qm-state="on"] [data-qm-state-visibility="off"] {
1217
  display: none;
1218
  }
1219
+
1220
+ #query-monitor-main.qm-no-js .qm-sort-controls,
1221
+ #query-monitor-main.qm-no-js .qm-toggle,
1222
+ #query-monitor-main.qm-no-js select.qm-filter {
1223
  display: none !important;
1224
  }
1225
+
1226
  #query-monitor-main .qm.qm-debug-bar textarea,
1227
  #query-monitor-main .qm.qm-debug-bar pre {
1228
+ border: 1px solid #50626f !important;
1229
  margin: 4px 0 !important;
1230
  padding: 10px !important;
1231
  }
1232
+
1233
  #query-monitor-main .qm.qm-debug-bar textarea {
1234
  resize: vertical !important;
1235
  }
1236
+
1237
  #query-monitor-main .qm.qm-debug-bar .left {
1238
  float: left !important;
1239
  }
1240
+
1241
  #query-monitor-main .qm.qm-debug-bar .right {
1242
  float: right !important;
1243
  }
1244
+
1245
  #query-monitor-main .qm.qm-debug-bar h2 {
1246
  font-size: 14px !important;
1247
  margin: 4px 6px 15px !important;
1248
  }
1249
+
1250
  #query-monitor-main .qm.qm-debug-bar h3 {
1251
  clear: none !important;
1252
  float: left !important;
1257
  padding: 5px 10px 15px !important;
1258
  text-align: center !important;
1259
  }
1260
+
1261
  #query-monitor-main .qm.qm-debug-bar h3 small {
1262
  font-size: 14px !important;
1263
  }
1264
+
1265
  #query-monitor-main .qm.qm-debug-bar h3 span {
1266
  display: block !important;
1267
  margin-bottom: 8px !important;
1268
  white-space: nowrap !important;
1269
  }
1270
+
1271
  #query-monitor-main .qm.qm-debug-bar h4 {
1272
  font-size: 13px !important;
1273
  margin: 15px 6px 5px !important;
1274
  }
1275
+
1276
  #query-monitor-main .qm.qm-debug-bar .qm-debug-bar-output {
1277
  position: relative !important;
1278
  }
1279
+
1280
  #query-monitor-main .qm.qm-debug-bar .qm-debug-bar-output table {
1281
  margin-bottom: 4px !important;
1282
  margin-top: 4px !important;
1283
  }
1284
+
1285
  #query-monitor-main #debug-menu-target-Debug_Bar_Console {
1286
  min-height: 400px !important;
1287
  }
1288
+
1289
  #query-monitor-main #debug-menu-target-Debug_Bar_Cache_Lookup,
1290
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules,
1291
  #query-monitor-main #debug-menu-target-Debug_Bar_Widgets {
1292
  margin: 4px 6px !important;
1293
  }
1294
+
1295
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules_Panel .filterui,
1296
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules_Panel .dbrr {
1297
  margin: 0 !important;
1298
  }
1299
+
1300
  #query-monitor-main.qm-broken #qm-title {
1301
  cursor: default !important;
1302
  }
1303
+
1304
+ #query-monitor-main #qm-broken,
1305
+ #query-monitor-main.qm-broken .qm-title-button {
1306
  display: none !important;
1307
  }
1308
+
1309
+ #query-monitor-main.qm-broken #qm-broken,
1310
+ #query-monitor-main.qm-broken .qm {
1311
  display: block !important;
1312
  }
1313
+
1314
  #query-monitor-main.qm-broken .qm {
1315
  margin-bottom: 50px !important;
1316
  }
1317
+
1318
  #query-monitor-main.qm-broken #qm-broken h2 {
1319
  padding: 20px !important;
1320
  }
assets/query-monitor.css CHANGED
@@ -6,43 +6,54 @@
6
  #wpadminbar .quicklinks .menupop ul li.qm-true > a {
7
  color: #8c8 !important;
8
  }
 
9
  #wpadminbar .quicklinks .menupop ul li.qm-true > a:focus, #wpadminbar .quicklinks .menupop ul li.qm-true > a:hover {
10
- color: #52b552 !important;
11
  }
 
12
  #wpadminbar .qm-alert {
13
  background-color: #f60;
14
  }
 
 
 
 
 
 
 
15
  #wpadminbar #wp-admin-bar-query-monitor-notices a,
 
 
16
  #wpadminbar .qm-notice {
17
  background-color: #740;
18
  }
19
- #wpadminbar #wp-admin-bar-query-monitor-deprecateds a,
20
- #wpadminbar .qm-deprecated {
21
- background-color: #3c3c3c;
22
- }
23
- #wpadminbar #wp-admin-bar-query-monitor-stricts a,
24
- #wpadminbar .qm-strict {
25
- background-color: #3c3c3c;
26
- }
27
  #wpadminbar #wp-admin-bar-query-monitor-expensive a,
28
  #wpadminbar .qm-expensive {
29
  background-color: #b60;
30
  }
 
 
 
 
 
 
31
  #wpadminbar #wp-admin-bar-query-monitor-logger-warning a,
32
  #wpadminbar #wp-admin-bar-query-monitor-warnings a,
 
 
33
  #wpadminbar .qm-warning {
34
  background-color: #c00;
35
  }
 
36
  #wpadminbar #wp-admin-bar-query-monitor-logger-warning a:hover,
37
  #wpadminbar #wp-admin-bar-query-monitor-warnings a:hover,
 
 
38
  #wpadminbar .qm-warning:hover {
39
- background-color: #b00;
40
- color: #ddd !important;
41
- }
42
- #wpadminbar #wp-admin-bar-query-monitor-errors a,
43
- #wpadminbar .qm-error {
44
- background-color: #c00;
45
  }
 
46
  #wpadminbar #wp-admin-bar-query-monitor .ab-icon {
47
  color: #aaa !important;
48
  display: none !important;
@@ -50,6 +61,7 @@
50
  padding: 0 10px !important;
51
  width: auto !important;
52
  }
 
53
  @media screen and (max-width: 782px) {
54
  #wpadminbar #wp-admin-bar-query-monitor .ab-icon {
55
  display: block !important;
@@ -66,6 +78,9 @@
66
  }
67
 
68
  body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover):not(.hover) .ab-label,
 
 
 
69
  #wp-admin-bar-query-monitor-deprecateds a,
70
  #wp-admin-bar-query-monitor-stricts a,
71
  #wp-admin-bar-query-monitor-notices a,
@@ -95,6 +110,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
95
  #query-monitor-main dt,
96
  #query-monitor-main dd,
97
  #query-monitor-main button,
 
98
  #query-monitor-main label,
99
  #query-monitor-main select,
100
  #query-monitor-main table,
@@ -104,6 +120,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
104
  #query-monitor-main ol,
105
  #query-monitor-main li,
106
  #query-monitor-main code,
 
107
  #query-monitor-main a,
108
  #query-monitor-main h1,
109
  #query-monitor-main h2,
@@ -130,6 +147,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
130
  letter-spacing: normal !important;
131
  line-height: 18px !important;
132
  margin: 0 !important;
 
133
  outline: none !important;
134
  padding: 0 !important;
135
  text-align: left !important;
@@ -143,6 +161,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
143
  word-break: normal !important;
144
  word-wrap: normal !important;
145
  }
 
146
  #query-monitor-main::before, #query-monitor-main::after,
147
  #query-monitor-main dl::before,
148
  #query-monitor-main dl::after,
@@ -152,6 +171,8 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
152
  #query-monitor-main dd::after,
153
  #query-monitor-main button::before,
154
  #query-monitor-main button::after,
 
 
155
  #query-monitor-main label::before,
156
  #query-monitor-main label::after,
157
  #query-monitor-main select::before,
@@ -170,6 +191,8 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
170
  #query-monitor-main li::after,
171
  #query-monitor-main code::before,
172
  #query-monitor-main code::after,
 
 
173
  #query-monitor-main a::before,
174
  #query-monitor-main a::after,
175
  #query-monitor-main h1::before,
@@ -192,6 +215,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
192
  #query-monitor-main p::after {
193
  display: none !important;
194
  }
 
195
  #query-monitor-main {
196
  background: #fff !important;
197
  border-top: 1px solid #aaa !important;
@@ -205,47 +229,58 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
205
  text-align: left !important;
206
  z-index: 99998 !important;
207
  }
 
208
  #query-monitor-main ::selection {
209
  background-color: #B9D6FB !important;
210
  color: #222 !important;
211
  }
 
212
  #query-monitor-main strong,
213
  #query-monitor-main b {
214
  font-weight: bold !important;
215
  }
 
216
  #query-monitor-main em,
217
  #query-monitor-main i {
218
  font-style: italic !important;
219
  }
 
220
  #query-monitor-main.qm-show, #query-monitor-main.qm-peek {
221
  display: flex;
222
  flex-direction: column !important;
223
  height: 27px;
224
  }
 
225
  #query-monitor-main.qm-show {
226
  height: 40%;
227
  width: 40%;
228
  }
 
229
  #query-monitor-main:not(.qm-show-right) {
230
  width: 100% !important;
231
  }
 
232
  #query-monitor-main.qm-show-right {
233
- height: calc( 100vh - 32px ) !important;
234
  top: 32px !important;
235
  left: unset !important;
236
  border-top: 0 !important;
237
  border-left: 1px solid #aaa !important;
238
  }
 
239
  #query-monitor-main.qm-show-right #qm-panel-menu,
240
  #query-monitor-main.qm-show-right #qm-title h1.qm-title-heading {
241
  display: none;
242
  }
 
243
  #query-monitor-main.qm-show-right #qm-title div.qm-title-heading {
244
  display: block;
245
  }
 
246
  #query-monitor-main.qm-show-right #qm-title {
247
  cursor: default !important;
248
  }
 
249
  #query-monitor-main.qm-show-right #qm-side-resizer {
250
  background: transparent !important;
251
  cursor: ew-resize !important;
@@ -257,16 +292,19 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
257
  width: 4px !important;
258
  z-index: 2 !important;
259
  }
 
260
  #query-monitor-main.qm-show-right.qm-peek {
261
  height: 100vh !important;
262
  top: 0 !important;
263
  }
 
264
  #query-monitor-main #qm-wrapper {
265
  display: flex;
266
  flex-grow: 1 !important;
267
  /* Fix nested scrolling in Firefox. See https://bugzilla.mozilla.org/show_bug.cgi?id=1043520: */
268
  min-height: 0;
269
  }
 
270
  #query-monitor-main #qm-title {
271
  align-items: center !important;
272
  background: #f3f3f3 !important;
@@ -281,31 +319,39 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
281
  -webkit-user-select: none !important;
282
  user-select: none !important;
283
  }
 
284
  #query-monitor-main #qm-title .qm-title-heading {
285
  border-right: 1px solid #bbb !important;
286
  flex-grow: 1 !important;
287
  margin-right: 6px !important;
288
  }
 
289
  #query-monitor-main #qm-title div.qm-title-heading {
290
  display: none;
291
  }
 
292
  #query-monitor-main #qm-title .qm-title-button {
293
  flex-shrink: 0 !important;
294
  }
 
295
  #query-monitor-main #qm-title .dashicons {
296
  transition: none !important;
297
  }
 
298
  #query-monitor-main #qm-title .qm-button-container-close {
299
  margin-right: 10px !important;
300
  }
 
301
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
302
  margin: 3px 0 3px !important;
303
  }
 
304
  @media screen and (max-width: 960px) {
305
  #query-monitor-main #qm-title .qm-button-container-position {
306
  display: none !important;
307
  }
308
  }
 
309
  #query-monitor-main #qm-title button {
310
  background: transparent !important;
311
  color: #666 !important;
@@ -315,33 +361,44 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
315
  min-width: auto !important;
316
  padding: 0px 4px !important;
317
  }
 
 
 
318
  #query-monitor-main #qm-title button:focus,
319
  #query-monitor-main #qm-title button:hover {
320
  background: #e6e6e6 !important;
321
  color: #000 !important;
322
  }
 
 
323
  #query-monitor-main #qm-title button:active {
324
  background: #ccc !important;
325
  }
 
326
  #query-monitor-main #qm-title button.qm-button-active {
327
  color: #3879d9 !important;
328
  }
 
329
  #query-monitor-main #qm-title .qm-button-container-settings .dashicons {
330
  font-size: 17px !important;
331
  margin: 4px 0 2px !important;
332
  }
 
333
  #query-monitor-main #qm-title .qm-button-container-position .dashicons {
334
  font-size: 15px !important;
335
  margin: 2px -1px 3px 4px !important;
336
  transform: scaleX(-1) rotate(90deg) !important;
337
  }
 
338
  #query-monitor-main.qm-show-right #qm-title .qm-button-container-position .dashicons {
339
  margin: 4px 1px 0px 1px !important;
340
  transform: none !important;
341
  }
 
342
  #query-monitor-main .qm {
343
  display: none !important;
344
  }
 
345
  #query-monitor-main #qm-panel-menu {
346
  background: #ececec !important;
347
  flex-shrink: 0 !important;
@@ -349,6 +406,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
349
  overscroll-behavior: contain !important;
350
  height: auto !important;
351
  }
 
352
  #query-monitor-main #qm-panel-menu ul {
353
  display: block !important;
354
  list-style: none !important;
@@ -357,12 +415,14 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
357
  width: auto !important;
358
  height: auto !important;
359
  }
 
360
  #query-monitor-main #qm-panel-menu li {
361
  display: list-item !important;
362
  margin: 0 !important;
363
  padding: 0 !important;
364
  height: auto !important;
365
  }
 
366
  #query-monitor-main #qm-panel-menu li button {
367
  background: #f3f3f3 !important;
368
  border-bottom: 1px solid #ddd !important;
@@ -375,44 +435,61 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
375
  text-decoration: none !important;
376
  width: 100% !important;
377
  }
 
378
  #query-monitor-main #qm-panel-menu li button:focus,
379
  #query-monitor-main #qm-panel-menu li button:hover {
380
  background: #cde !important;
381
  color: #222 !important;
382
  }
 
383
  #query-monitor-main #qm-panel-menu li button:focus {
384
  text-decoration: underline !important;
385
  }
 
 
 
 
 
 
 
 
386
  #query-monitor-main #qm-panel-menu li.qm-current-menu button {
387
  background: #def !important;
388
  color: #222 !important;
389
  }
 
390
  #query-monitor-main #qm-panel-menu li.qm-current-menu button:focus {
391
  background: #f7fbff !important;
392
  color: #222 !important;
393
  }
 
394
  #query-monitor-main #qm-panel-menu li.qm-current-menu button:hover {
395
  background: #cde !important;
396
  color: #222 !important;
397
  }
 
398
  #query-monitor-main #qm-panel-menu li li button::before {
399
  content: "\2514" !important;
400
  display: inline-block !important;
401
  margin-right: 5px !important;
402
  }
 
403
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"] {
404
  background: #0073aa !important;
405
  color: #fff !important;
406
  text-shadow: 0 -1px 1px #006291, 1px 0 1px #006291, 0 1px 1px #006291, -1px 0 1px #006291 !important;
407
  }
 
408
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:focus {
409
  background: #0084c4 !important;
410
  color: #fff !important;
411
  }
 
412
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:hover {
413
  background: #0073aa !important;
414
  color: #fff !important;
415
  }
 
416
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:after {
417
  border: solid 8px transparent;
418
  border-right-color: #fff;
@@ -426,65 +503,79 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
426
  top: 50%;
427
  width: 0;
428
  }
 
429
  #query-monitor-main #qm-panels {
430
  flex-grow: 1 !important;
431
  overflow-y: scroll !important;
432
  overscroll-behavior: contain !important;
433
  }
 
434
  #query-monitor-main .qm.qm-panel-show {
435
  display: block !important;
436
  }
 
437
  #query-monitor-main .qm:focus {
438
  outline: 0 !important;
439
  /* @TODO might not need this any more */
440
  }
 
441
  #query-monitor-main .qm-boxed {
442
  display: flex !important;
443
  flex-wrap: wrap !important;
444
  }
 
445
  #query-monitor-main .qm-boxed:not(#qm-broken) + .qm-boxed {
446
  border-top: 1px solid #ddd !important;
447
  padding-top: 10px !important;
448
  }
 
449
  #query-monitor-main .qm-boxed-wrap {
450
  flex-wrap: wrap !important;
451
  }
 
452
  #query-monitor-main .qm .qm-none {
453
  margin: 2em !important;
454
  }
 
455
  #query-monitor-main .qm .qm-none p {
456
  font-style: italic !important;
457
  text-align: center !important;
458
  }
 
459
  #query-monitor-main .qm table {
460
  border: none !important;
461
- border-bottom: 1px solid #e0e0e0 !important;
462
  border-collapse: collapse !important;
463
- box-shadow: none !important;
464
  color: #222 !important;
465
  margin: 0 !important;
466
  table-layout: auto !important;
467
  width: 100% !important;
468
  }
 
469
  #query-monitor-main .qm table + table {
470
  border-top: 1px solid #e0e0e0 !important;
471
  margin-top: 5px !important;
472
  }
 
473
  #query-monitor-main .qm tr {
474
  border: none !important;
475
  }
 
476
  #query-monitor-main .qm tbody th,
477
  #query-monitor-main .qm tbody td,
478
  #query-monitor-main .qm tfoot th,
479
  #query-monitor-main .qm tfoot td {
480
  border: 1px solid #e0e0e0 !important;
481
  padding: 5px 5px 4px 5px !important;
 
482
  }
 
483
  #query-monitor-main .qm tbody th,
484
  #query-monitor-main .qm tbody td {
485
  border-bottom: none !important;
486
  border-top: none !important;
487
  }
 
488
  #query-monitor-main .qm thead th {
489
  background: #fff !important;
490
  border: 1px solid #e0e0e0 !important;
@@ -496,150 +587,189 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
496
  top: 0 !important;
497
  z-index: 1 !important;
498
  }
 
 
 
 
 
 
499
  #query-monitor-main .qm thead .qm-th {
500
  display: flex !important;
501
  }
 
502
  #query-monitor-main .qm tfoot tr td,
503
  #query-monitor-main .qm tfoot tr th {
504
  background: #f3f3f3 !important;
505
- border: 1px solid #e0e0e0 !important;
506
- border-bottom: none !important;
507
  bottom: 0 !important;
508
  box-shadow: inset 0px 1px 0px #e0e0e0 !important;
509
  position: -webkit-sticky !important;
510
  position: sticky !important;
511
  }
 
512
  #query-monitor-main .qm th:first-child,
513
  #query-monitor-main .qm td:first-child {
514
  border-left: none !important;
515
  }
 
516
  #query-monitor-main .qm th:last-child,
517
  #query-monitor-main .qm td:last-child {
518
  border-right: none !important;
519
  }
 
520
  #query-monitor-main .qm tfoot td.qm-num,
521
  #query-monitor-main .qm tfoot th.qm-num,
522
  #query-monitor-main .qm thead td.qm-num,
523
  #query-monitor-main .qm thead th.qm-num {
524
  width: 5.5em !important;
525
  }
 
526
  #query-monitor-main .qm th.qm-num,
527
  #query-monitor-main .qm td.qm-num {
528
  text-align: right !important;
529
  }
 
530
  #query-monitor-main .qm td.qm-num {
531
  font-family: Menlo, Monaco, Consolas, monospace !important;
532
  font-size: 11px !important;
533
  line-height: 18px !important;
534
  }
 
535
  #query-monitor-main .qm td.qm-row-sql {
536
  min-width: 25em !important;
537
  }
 
 
538
  #query-monitor-main .qm td.qm-row-block-html {
539
  max-width: 40em !important;
540
  }
 
541
  #query-monitor-main .qm tr.qm-warn td.qm-col-status,
542
  #query-monitor-main .qm td.qm-url,
543
  #query-monitor-main .qm th.qm-col-message,
544
  #query-monitor-main .qm td.qm-row-component {
545
  min-width: 15em !important;
546
  }
547
- #query-monitor-main .qm td .qm-toggler {
548
- padding: 0 22px 0 0 !important;
 
549
  position: relative !important;
550
  }
 
551
  #query-monitor-main .qm td.qm-has-toggle:not(.qm-toggled-on) .qm-supplemental {
552
  display: none;
553
  }
 
554
  #query-monitor-main .qm .qm-inner-toggle {
555
  padding: 4px 6px !important;
556
  }
 
557
  #query-monitor-main .qm .qm-has-inner .qm-toggled > table {
558
  border-bottom: none !important;
559
  border-top: 1px solid #e0e0e0 !important;
560
  }
 
561
  #query-monitor-main .qm td.qm-has-inner .qm-toggler,
562
  #query-monitor-main .qm td.qm-has-inner {
563
  padding: 0 !important;
564
  }
 
565
  #query-monitor-main .qm caption h2 {
566
  font-size: 14px !important;
567
  margin: 20px !important;
568
  }
 
569
  #query-monitor-main .qm-concerns table {
570
  border-top: 1px solid #e0e0e0 !important;
571
  margin-bottom: 20px !important;
572
  }
 
573
  #query-monitor-main .qm-non-tabular {
574
  padding: 10px 20px !important;
575
  }
 
576
  #query-monitor-main .qm-non-tabular h3 {
577
  font-size: 14px !important;
578
  margin: 0 0 15px 0 !important;
579
  }
 
580
  #query-monitor-main .qm-non-tabular h4 {
581
  font-size: 12px !important;
582
  margin: 20px 0 10px !important;
583
  }
 
584
  #query-monitor-main .qm-non-tabular p {
585
  margin-bottom: 10px !important;
586
  }
 
587
  #query-monitor-main .qm-non-tabular dl {
588
  display: flex !important;
589
  flex-wrap: wrap !important;
590
  max-width: 60em !important;
591
  }
 
592
  #query-monitor-main .qm-non-tabular dt {
593
  border-top: 1px solid #ddd !important;
594
  flex-grow: 0;
595
  flex: 1 0 16em;
596
  padding: 10px 10px 10px 0 !important;
597
  }
 
598
  #query-monitor-main .qm-non-tabular dd {
599
  border-top: 1px solid #ddd !important;
600
  flex: 1 0 calc(100% - 10px - 16em);
601
  padding: 10px 0 !important;
602
  }
 
603
  #query-monitor-main .qm-non-tabular section,
604
  #query-monitor-main .qm-non-tabular .qm-section {
605
  margin: 0 0 30px 0 !important;
606
  }
 
607
  #query-monitor-main .qm-non-tabular .qm-boxed section,
608
  #query-monitor-main .qm-non-tabular .qm-boxed .qm-section {
609
  border-right: 1px solid #ddd !important;
610
  margin: 0 20px 10px 0 !important;
611
  padding: 10px 20px 10px 0 !important;
612
  }
 
613
  #query-monitor-main .qm-non-tabular .qm-boxed section:last-child,
614
  #query-monitor-main .qm-non-tabular .qm-boxed .qm-section:last-child {
615
  border-right: none !important;
616
  margin-right: 0 !important;
617
  padding-right: 20px !important;
618
  }
 
619
  #query-monitor-main .qm-non-tabular table {
620
  border-bottom-color: #e0e0e0 !important;
621
  }
 
622
  #query-monitor-main #qm-conditionals li {
623
  display: inline-block !important;
624
  margin: 0 20px 5px 0 !important;
625
  }
 
626
  #query-monitor-main .qm ol,
627
  #query-monitor-main .qm ul {
628
  list-style: none !important;
629
  }
 
630
  #query-monitor-main .qm li {
631
  display: list-item !important;
632
  list-style: none !important;
633
  }
 
634
  #query-monitor-main .qm li::before {
635
  content: '' !important;
636
  }
 
637
  #query-monitor-main .qm code,
638
  #query-monitor-main .qm pre {
639
  font-family: Menlo, Monaco, Consolas, monospace !important;
640
  font-size: 11px !important;
641
  line-height: 18px !important;
642
  }
 
643
  #query-monitor-main .qm pre {
644
  background: transparent !important;
645
  height: auto !important;
@@ -647,64 +777,76 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
647
  padding: 0 !important;
648
  width: auto !important;
649
  }
 
650
  #query-monitor-main .qm .qm-true code,
651
  #query-monitor-main .qm p.qm-true,
652
  #query-monitor-main .qm span.qm-true,
653
  #query-monitor-main .qm td.qm-true {
654
- color: #4a4 !important;
655
  }
 
656
  #query-monitor-main .qm .qm-false code,
657
  #query-monitor-main .qm span.qm-false,
658
  #query-monitor-main .qm td.qm-false {
659
  color: #999 !important;
660
  }
 
661
  #query-monitor-main .qm .qm-num,
662
  #query-monitor-main .qm code,
663
  #query-monitor-main .qm .qm-nowrap {
664
  white-space: nowrap !important;
665
  }
 
666
  #query-monitor-main .qm .qm-wrap code,
667
  #query-monitor-main .qm .qm-wrap {
668
  white-space: normal !important;
669
  word-break: break-all !important;
670
  word-wrap: break-word !important;
671
  }
 
672
  #query-monitor-main .qm .qm-pre-wrap code {
673
  white-space: pre-wrap !important;
674
  word-break: break-all !important;
675
  word-wrap: break-word !important;
676
  }
 
677
  #query-monitor-main .qm .qm-sticky {
678
  position: sticky !important;
679
  top: 36px !important;
680
  }
 
681
  #query-monitor-main .qm .qm-current,
682
  #query-monitor-main .qm td.qm-has-toggle p,
683
  #query-monitor-main .qm .qm-nonselectsql code,
684
  #query-monitor-main .qm .qm-nonselectsql {
685
  color: #a0a !important;
686
  }
 
687
  #query-monitor-main .qm .qm-info {
688
- color: #777 !important;
689
  }
 
690
  #query-monitor-main .qm .qm-supplemental {
691
  margin-left: 0.75em !important;
692
  margin-right: 0.75em !important;
693
  }
 
694
  #query-monitor-main .qm td.qm-toggled-on .qm-inverse-toggled,
695
  #query-monitor-main .qm td .qm-toggled {
696
  display: none;
697
  }
 
698
  #query-monitor-main .qm button.qm-button,
699
  #query-monitor-main .qm .qm-toggle {
700
- background: #0085ba !important;
701
- border: 1px solid #0073a1 !important;
702
- border-radius: 2px !important;
703
  color: #fff !important;
704
  cursor: pointer !important;
705
  font-weight: normal !important;
706
- text-shadow: 0 -1px 1px #0073a1, 1px 0 1px #0073a1, 0 1px 1px #0073a1, -1px 0 1px #0073a1 !important;
707
  }
 
708
  #query-monitor-main .qm .qm-toggle {
709
  bottom: auto !important;
710
  font-family: Menlo, Monaco, Consolas, monospace !important;
@@ -713,61 +855,91 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
713
  line-height: 16px !important;
714
  padding: 0 !important;
715
  position: absolute !important;
716
- right: 0 !important;
717
  text-align: center !important;
718
- top: 0 !important;
719
  width: 18px !important;
720
  }
 
721
  #query-monitor-main .qm button {
722
  cursor: pointer !important;
723
  }
 
724
  #query-monitor-main .qm button.qm-button {
725
  padding: 4px 10px !important;
726
  }
 
727
  #query-monitor-main .qm .qm-has-inner .qm-toggle {
728
  right: 5px !important;
729
  top: 5px !important;
730
  }
 
731
  #query-monitor-main .qm button.qm-button:hover,
732
- #query-monitor-main .qm button.qm-button:focus,
733
- #query-monitor-main .qm .qm-toggle:focus,
734
  #query-monitor-main .qm .qm-toggle:hover {
735
- background: #0094ce !important;
 
736
  color: #fff !important;
737
  text-decoration: none !important;
738
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
739
  #query-monitor-main .qm tbody tr.qm-odd td,
740
  #query-monitor-main .qm tbody tr.qm-odd th {
741
- background: #f7f7f7 !important;
742
  }
 
743
  #query-monitor-main .qm-non-tabular .qm-warn,
744
  #query-monitor-main .qm thead tr .qm-warn,
745
  #query-monitor-main .qm tbody tr .qm-warn {
746
  background-color: #fff0f0 !important;
747
- color: #a00 !important;
748
  }
 
749
  #query-monitor-main .qm tbody tr th.qm-warn,
750
  #query-monitor-main .qm tbody tr td.qm-warn,
751
  #query-monitor-main .qm tbody tr.qm-warn td,
752
  #query-monitor-main .qm tbody tr.qm-warn th {
753
  background-color: #fff0f0 !important;
754
- border-color: #ffd6d6 !important;
755
- box-shadow: inset 0 -1px #ffd6d6 !important;
756
- color: #a00 !important;
 
 
 
 
 
757
  }
 
758
  #query-monitor-main .qm-non-tabular .qm-warn code,
759
  #query-monitor-main .qm tbody .qm-warn li,
760
  #query-monitor-main .qm tbody .qm-warn .qm-info,
761
  #query-monitor-main .qm tbody .qm-warn code {
762
  background-color: transparent !important;
763
- color: #a00 !important;
764
  }
 
765
  #query-monitor-main .qm .qm-notice {
766
- background: #cde !important;
767
- border: 1px solid #a6c4e1 !important;
768
  margin: 0 0 10px 0 !important;
769
  padding: 10px 20px 0 !important;
770
  }
 
771
  #query-monitor-main .qm .dashicons {
772
  font-size: 16px !important;
773
  height: 16px !important;
@@ -775,21 +947,29 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
775
  transition: none !important;
776
  width: 16px !important;
777
  }
 
778
  #query-monitor-main .qm .qm-dashicons-yes {
779
  background-color: #0a0 !important;
780
  border-radius: 50% !important;
781
  color: #fff !important;
782
  }
 
 
 
 
 
783
  #query-monitor-main .qm tbody tr.qm-hovered th,
784
  #query-monitor-main .qm tbody tr.qm-hovered td,
785
  #query-monitor-main .qm tbody tr:hover th,
786
  #query-monitor-main .qm tbody tr:hover td {
787
  background: #eef3fa !important;
788
  }
 
789
  #query-monitor-main .qm thead th.qm-filtered select.qm-filter {
790
  background-color: #ffd !important;
791
  color: #222 !important;
792
  }
 
793
  #query-monitor-main .qm tbody tr td.qm-highlight,
794
  #query-monitor-main .qm tbody tr.qm-highlight td {
795
  background-color: #ffd !important;
@@ -797,6 +977,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
797
  box-shadow: inset 0 -1px #eec !important;
798
  color: #222 !important;
799
  }
 
800
  #query-monitor-main .qm button.qm-filter-trigger,
801
  #query-monitor-main .qm button.qm-filter-trigger code,
802
  #query-monitor-main .qm tbody .qm-warn a code,
@@ -806,6 +987,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
806
  cursor: pointer !important;
807
  text-decoration: none !important;
808
  }
 
809
  #query-monitor-main .qm button.qm-filter-trigger:after, #query-monitor-main .qm button.qm-filter-trigger:focus, #query-monitor-main .qm button.qm-filter-trigger:hover,
810
  #query-monitor-main .qm button.qm-filter-trigger code:after,
811
  #query-monitor-main .qm button.qm-filter-trigger code:focus,
@@ -822,13 +1004,23 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
822
  color: #0096dd !important;
823
  text-decoration: underline !important;
824
  }
 
 
 
 
 
 
 
 
 
 
825
  #query-monitor-main .qm a.qm-external-link:after,
826
  #query-monitor-main .qm a.qm-link:after,
827
  #query-monitor-main .qm a.qm-edit-link:after,
828
  #query-monitor-main .qm button.qm-filter-trigger:after {
829
  display: inline-block !important;
830
  font-family: dashicons !important;
831
- font-size: 13px !important;
832
  left: 2px !important;
833
  line-height: 15px !important;
834
  position: relative !important;
@@ -836,6 +1028,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
836
  top: 2px !important;
837
  visibility: hidden !important;
838
  }
 
839
  #query-monitor-main .qm a.qm-external-link:after,
840
  #query-monitor-main .qm a.qm-link:hover:after,
841
  #query-monitor-main .qm a.qm-link:focus:after,
@@ -845,19 +1038,24 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
845
  #query-monitor-main .qm button.qm-filter-trigger:focus:after {
846
  visibility: visible !important;
847
  }
 
848
  #query-monitor-main .qm button.qm-filter-trigger:after {
849
  content: '\f536' !important;
850
  }
 
851
  #query-monitor-main .qm a.qm-edit-link:after {
852
  content: '\f464' !important;
853
  }
 
854
  #query-monitor-main .qm a.qm-external-link:after,
855
  #query-monitor-main .qm a.qm-link:after {
856
  content: '\f504' !important;
857
  }
 
858
  #query-monitor-main #qm-ajax-errors {
859
  display: none;
860
  }
 
861
  #query-monitor-main button,
862
  #query-monitor-main select {
863
  background: none !important;
@@ -866,6 +1064,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
866
  margin: 0 !important;
867
  width: auto !important;
868
  }
 
869
  #query-monitor-main .qm label {
870
  color: #222 !important;
871
  cursor: pointer !important;
@@ -874,20 +1073,25 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
874
  font-weight: normal !important;
875
  margin: 0 !important;
876
  }
 
877
  #query-monitor-main .qm thead label {
878
  flex-grow: 1 !important;
879
  }
 
880
  #query-monitor-main .qm .qm-filter-container {
881
  display: flex !important;
882
  }
 
883
  #query-monitor-main .qm .qm-filter-container label {
884
  cursor: default !important;
885
  white-space: nowrap !important;
886
  }
 
887
  #query-monitor-main .qm .qm-filter-container div {
888
  /* Some themes use Select2 etc on all selects. This hides that. */
889
  display: none !important;
890
  }
 
891
  #query-monitor-main .qm select.qm-filter {
892
  -webkit-appearance: menulist !important;
893
  -moz-appearance: menulist !important;
@@ -901,14 +1105,16 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
901
  height: auto !important;
902
  letter-spacing: normal !important;
903
  margin: 0 0 0 5px !important;
904
- max-width: 10em !important;
905
  outline: 1px solid #aaa !important;
906
  padding: 0 !important;
907
  width: auto !important;
908
  }
 
909
  #query-monitor-main .qm select.qm-filter:hover {
910
  background: #f3f3f3 !important;
911
  }
 
912
  #query-monitor-main .qm-hide,
913
  #query-monitor-main .qm-hide-scripts-dependencies,
914
  #query-monitor-main .qm-hide-styles-dependencies,
@@ -924,19 +1130,24 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
924
  #query-monitor-main .qm-hide-component {
925
  display: none !important;
926
  }
 
927
  #query-monitor-main .qm thead th.qm-sortable-column {
928
  cursor: pointer !important;
929
  }
 
930
  #query-monitor-main .qm thead th.qm-sortable-column:hover {
931
  background: #f3f3f3 !important;
932
  }
 
933
  #query-monitor-main .qm .qm-sort-heading {
934
  flex-grow: 1 !important;
935
  }
 
936
  #query-monitor-main .qm .qm-sort-controls {
937
  flex-shrink: 0 !important;
938
  text-align: right !important;
939
  }
 
940
  #query-monitor-main .qm .qm-sortable-column .qm-sort-arrow {
941
  color: #ccc !important;
942
  display: block !important;
@@ -946,27 +1157,39 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
946
  margin: 0 !important;
947
  width: 16px !important;
948
  }
 
949
  #query-monitor-main .qm .qm-sortable-column .qm-sort-arrow::before {
950
  content: "\f140" !important;
951
  position: absolute !important;
952
  right: 0 !important;
953
  top: 4px !important;
954
  }
 
955
  #query-monitor-main .qm .qm-sorted-desc .qm-sort-arrow,
956
  #query-monitor-main .qm .qm-sorted-asc .qm-sort-arrow {
957
  color: #222 !important;
958
  }
 
959
  #query-monitor-main .qm thead th.qm-sortable-column:hover .qm-sort-arrow {
960
  color: #0073aa !important;
961
  }
 
962
  #query-monitor-main .qm .qm-sortable-column.qm-sorted-asc .qm-sort-arrow::before {
963
  content: "\f142" !important;
964
  }
 
965
  #query-monitor-main .qm button:focus,
966
  #query-monitor-main .qm a:focus,
967
  #query-monitor-main .qm select:focus {
968
- box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8) !important;
 
 
 
 
 
 
969
  }
 
970
  #query-monitor-main .qm-screen-reader-text,
971
  #query-monitor-main .screen-reader-text {
972
  border: 0 !important;
@@ -978,6 +1201,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
978
  position: absolute !important;
979
  width: 1px !important;
980
  }
 
981
  @media screen and (max-width: 782px) {
982
  #query-monitor-main #qm-panel-menu,
983
  #query-monitor-main #qm-title h1.qm-title-heading {
@@ -987,32 +1211,42 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
987
  display: block;
988
  }
989
  }
 
990
  #query-monitor-main [data-qm-state="off"] [data-qm-state-visibility="on"],
991
  #query-monitor-main [data-qm-state="on"] [data-qm-state-visibility="off"] {
992
  display: none;
993
  }
994
- #query-monitor-main.qm-no-js .qm-sort-controls, #query-monitor-main.qm-no-js .qm-toggle, #query-monitor-main.qm-no-js select.qm-filter {
 
 
 
995
  display: none !important;
996
  }
 
997
  #query-monitor-main .qm.qm-debug-bar textarea,
998
  #query-monitor-main .qm.qm-debug-bar pre {
999
  border: 1px solid #ddd !important;
1000
  margin: 4px 0 !important;
1001
  padding: 10px !important;
1002
  }
 
1003
  #query-monitor-main .qm.qm-debug-bar textarea {
1004
  resize: vertical !important;
1005
  }
 
1006
  #query-monitor-main .qm.qm-debug-bar .left {
1007
  float: left !important;
1008
  }
 
1009
  #query-monitor-main .qm.qm-debug-bar .right {
1010
  float: right !important;
1011
  }
 
1012
  #query-monitor-main .qm.qm-debug-bar h2 {
1013
  font-size: 14px !important;
1014
  margin: 4px 6px 15px !important;
1015
  }
 
1016
  #query-monitor-main .qm.qm-debug-bar h3 {
1017
  clear: none !important;
1018
  float: left !important;
@@ -1023,49 +1257,64 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
1023
  padding: 5px 10px 15px !important;
1024
  text-align: center !important;
1025
  }
 
1026
  #query-monitor-main .qm.qm-debug-bar h3 small {
1027
  font-size: 14px !important;
1028
  }
 
1029
  #query-monitor-main .qm.qm-debug-bar h3 span {
1030
  display: block !important;
1031
  margin-bottom: 8px !important;
1032
  white-space: nowrap !important;
1033
  }
 
1034
  #query-monitor-main .qm.qm-debug-bar h4 {
1035
  font-size: 13px !important;
1036
  margin: 15px 6px 5px !important;
1037
  }
 
1038
  #query-monitor-main .qm.qm-debug-bar .qm-debug-bar-output {
1039
  position: relative !important;
1040
  }
 
1041
  #query-monitor-main .qm.qm-debug-bar .qm-debug-bar-output table {
1042
  margin-bottom: 4px !important;
1043
  margin-top: 4px !important;
1044
  }
 
1045
  #query-monitor-main #debug-menu-target-Debug_Bar_Console {
1046
  min-height: 400px !important;
1047
  }
 
1048
  #query-monitor-main #debug-menu-target-Debug_Bar_Cache_Lookup,
1049
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules,
1050
  #query-monitor-main #debug-menu-target-Debug_Bar_Widgets {
1051
  margin: 4px 6px !important;
1052
  }
 
1053
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules_Panel .filterui,
1054
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules_Panel .dbrr {
1055
  margin: 0 !important;
1056
  }
 
1057
  #query-monitor-main.qm-broken #qm-title {
1058
  cursor: default !important;
1059
  }
1060
- #query-monitor-main #qm-broken, #query-monitor-main.qm-broken .qm-title-button {
 
 
1061
  display: none !important;
1062
  }
1063
- #query-monitor-main.qm-broken #qm-broken, #query-monitor-main.qm-broken .qm {
 
 
1064
  display: block !important;
1065
  }
 
1066
  #query-monitor-main.qm-broken .qm {
1067
  margin-bottom: 50px !important;
1068
  }
 
1069
  #query-monitor-main.qm-broken #qm-broken h2 {
1070
  padding: 20px !important;
1071
  }
6
  #wpadminbar .quicklinks .menupop ul li.qm-true > a {
7
  color: #8c8 !important;
8
  }
9
+
10
  #wpadminbar .quicklinks .menupop ul li.qm-true > a:focus, #wpadminbar .quicklinks .menupop ul li.qm-true > a:hover {
11
+ color: #47a747 !important;
12
  }
13
+
14
  #wpadminbar .qm-alert {
15
  background-color: #f60;
16
  }
17
+
18
+ #wpadminbar .qm-alert:hover {
19
+ background-color: #e65c00;
20
+ }
21
+
22
+ #wpadminbar #wp-admin-bar-query-monitor-stricts a,
23
+ #wpadminbar #wp-admin-bar-query-monitor-deprecateds a,
24
  #wpadminbar #wp-admin-bar-query-monitor-notices a,
25
+ #wpadminbar .qm-strict,
26
+ #wpadminbar .qm-deprecated,
27
  #wpadminbar .qm-notice {
28
  background-color: #740;
29
  }
30
+
 
 
 
 
 
 
 
31
  #wpadminbar #wp-admin-bar-query-monitor-expensive a,
32
  #wpadminbar .qm-expensive {
33
  background-color: #b60;
34
  }
35
+
36
+ #wpadminbar #wp-admin-bar-query-monitor-expensive a:hover,
37
+ #wpadminbar .qm-expensive:hover {
38
+ background-color: #915700;
39
+ }
40
+
41
  #wpadminbar #wp-admin-bar-query-monitor-logger-warning a,
42
  #wpadminbar #wp-admin-bar-query-monitor-warnings a,
43
+ #wpadminbar #wp-admin-bar-query-monitor-errors a,
44
+ #wpadminbar .qm-error,
45
  #wpadminbar .qm-warning {
46
  background-color: #c00;
47
  }
48
+
49
  #wpadminbar #wp-admin-bar-query-monitor-logger-warning a:hover,
50
  #wpadminbar #wp-admin-bar-query-monitor-warnings a:hover,
51
+ #wpadminbar #wp-admin-bar-query-monitor-errors a:hover,
52
+ #wpadminbar .qm-error:hover,
53
  #wpadminbar .qm-warning:hover {
54
+ background-color: #b30000;
 
 
 
 
 
55
  }
56
+
57
  #wpadminbar #wp-admin-bar-query-monitor .ab-icon {
58
  color: #aaa !important;
59
  display: none !important;
61
  padding: 0 10px !important;
62
  width: auto !important;
63
  }
64
+
65
  @media screen and (max-width: 782px) {
66
  #wpadminbar #wp-admin-bar-query-monitor .ab-icon {
67
  display: block !important;
78
  }
79
 
80
  body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover):not(.hover) .ab-label,
81
+ #wp-admin-bar-query-monitor-default .qm-alert a,
82
+ #wp-admin-bar-query-monitor-default .qm-error a,
83
+ #wp-admin-bar-query-monitor-default .qm-warning a,
84
  #wp-admin-bar-query-monitor-deprecateds a,
85
  #wp-admin-bar-query-monitor-stricts a,
86
  #wp-admin-bar-query-monitor-notices a,
110
  #query-monitor-main dt,
111
  #query-monitor-main dd,
112
  #query-monitor-main button,
113
+ #query-monitor-main caption,
114
  #query-monitor-main label,
115
  #query-monitor-main select,
116
  #query-monitor-main table,
120
  #query-monitor-main ol,
121
  #query-monitor-main li,
122
  #query-monitor-main code,
123
+ #query-monitor-main pre,
124
  #query-monitor-main a,
125
  #query-monitor-main h1,
126
  #query-monitor-main h2,
147
  letter-spacing: normal !important;
148
  line-height: 18px !important;
149
  margin: 0 !important;
150
+ min-height: auto !important;
151
  outline: none !important;
152
  padding: 0 !important;
153
  text-align: left !important;
161
  word-break: normal !important;
162
  word-wrap: normal !important;
163
  }
164
+
165
  #query-monitor-main::before, #query-monitor-main::after,
166
  #query-monitor-main dl::before,
167
  #query-monitor-main dl::after,
171
  #query-monitor-main dd::after,
172
  #query-monitor-main button::before,
173
  #query-monitor-main button::after,
174
+ #query-monitor-main caption::before,
175
+ #query-monitor-main caption::after,
176
  #query-monitor-main label::before,
177
  #query-monitor-main label::after,
178
  #query-monitor-main select::before,
191
  #query-monitor-main li::after,
192
  #query-monitor-main code::before,
193
  #query-monitor-main code::after,
194
+ #query-monitor-main pre::before,
195
+ #query-monitor-main pre::after,
196
  #query-monitor-main a::before,
197
  #query-monitor-main a::after,
198
  #query-monitor-main h1::before,
215
  #query-monitor-main p::after {
216
  display: none !important;
217
  }
218
+
219
  #query-monitor-main {
220
  background: #fff !important;
221
  border-top: 1px solid #aaa !important;
229
  text-align: left !important;
230
  z-index: 99998 !important;
231
  }
232
+
233
  #query-monitor-main ::selection {
234
  background-color: #B9D6FB !important;
235
  color: #222 !important;
236
  }
237
+
238
  #query-monitor-main strong,
239
  #query-monitor-main b {
240
  font-weight: bold !important;
241
  }
242
+
243
  #query-monitor-main em,
244
  #query-monitor-main i {
245
  font-style: italic !important;
246
  }
247
+
248
  #query-monitor-main.qm-show, #query-monitor-main.qm-peek {
249
  display: flex;
250
  flex-direction: column !important;
251
  height: 27px;
252
  }
253
+
254
  #query-monitor-main.qm-show {
255
  height: 40%;
256
  width: 40%;
257
  }
258
+
259
  #query-monitor-main:not(.qm-show-right) {
260
  width: 100% !important;
261
  }
262
+
263
  #query-monitor-main.qm-show-right {
264
+ height: calc( 100vh - 32px) !important;
265
  top: 32px !important;
266
  left: unset !important;
267
  border-top: 0 !important;
268
  border-left: 1px solid #aaa !important;
269
  }
270
+
271
  #query-monitor-main.qm-show-right #qm-panel-menu,
272
  #query-monitor-main.qm-show-right #qm-title h1.qm-title-heading {
273
  display: none;
274
  }
275
+
276
  #query-monitor-main.qm-show-right #qm-title div.qm-title-heading {
277
  display: block;
278
  }
279
+
280
  #query-monitor-main.qm-show-right #qm-title {
281
  cursor: default !important;
282
  }
283
+
284
  #query-monitor-main.qm-show-right #qm-side-resizer {
285
  background: transparent !important;
286
  cursor: ew-resize !important;
292
  width: 4px !important;
293
  z-index: 2 !important;
294
  }
295
+
296
  #query-monitor-main.qm-show-right.qm-peek {
297
  height: 100vh !important;
298
  top: 0 !important;
299
  }
300
+
301
  #query-monitor-main #qm-wrapper {
302
  display: flex;
303
  flex-grow: 1 !important;
304
  /* Fix nested scrolling in Firefox. See https://bugzilla.mozilla.org/show_bug.cgi?id=1043520: */
305
  min-height: 0;
306
  }
307
+
308
  #query-monitor-main #qm-title {
309
  align-items: center !important;
310
  background: #f3f3f3 !important;
319
  -webkit-user-select: none !important;
320
  user-select: none !important;
321
  }
322
+
323
  #query-monitor-main #qm-title .qm-title-heading {
324
  border-right: 1px solid #bbb !important;
325
  flex-grow: 1 !important;
326
  margin-right: 6px !important;
327
  }
328
+
329
  #query-monitor-main #qm-title div.qm-title-heading {
330
  display: none;
331
  }
332
+
333
  #query-monitor-main #qm-title .qm-title-button {
334
  flex-shrink: 0 !important;
335
  }
336
+
337
  #query-monitor-main #qm-title .dashicons {
338
  transition: none !important;
339
  }
340
+
341
  #query-monitor-main #qm-title .qm-button-container-close {
342
  margin-right: 10px !important;
343
  }
344
+
345
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
346
  margin: 3px 0 3px !important;
347
  }
348
+
349
  @media screen and (max-width: 960px) {
350
  #query-monitor-main #qm-title .qm-button-container-position {
351
  display: none !important;
352
  }
353
  }
354
+
355
  #query-monitor-main #qm-title button {
356
  background: transparent !important;
357
  color: #666 !important;
361
  min-width: auto !important;
362
  padding: 0px 4px !important;
363
  }
364
+
365
+ #query-monitor-main #qm-title button:focus *,
366
+ #query-monitor-main #qm-title button:hover *,
367
  #query-monitor-main #qm-title button:focus,
368
  #query-monitor-main #qm-title button:hover {
369
  background: #e6e6e6 !important;
370
  color: #000 !important;
371
  }
372
+
373
+ #query-monitor-main #qm-title button:active *,
374
  #query-monitor-main #qm-title button:active {
375
  background: #ccc !important;
376
  }
377
+
378
  #query-monitor-main #qm-title button.qm-button-active {
379
  color: #3879d9 !important;
380
  }
381
+
382
  #query-monitor-main #qm-title .qm-button-container-settings .dashicons {
383
  font-size: 17px !important;
384
  margin: 4px 0 2px !important;
385
  }
386
+
387
  #query-monitor-main #qm-title .qm-button-container-position .dashicons {
388
  font-size: 15px !important;
389
  margin: 2px -1px 3px 4px !important;
390
  transform: scaleX(-1) rotate(90deg) !important;
391
  }
392
+
393
  #query-monitor-main.qm-show-right #qm-title .qm-button-container-position .dashicons {
394
  margin: 4px 1px 0px 1px !important;
395
  transform: none !important;
396
  }
397
+
398
  #query-monitor-main .qm {
399
  display: none !important;
400
  }
401
+
402
  #query-monitor-main #qm-panel-menu {
403
  background: #ececec !important;
404
  flex-shrink: 0 !important;
406
  overscroll-behavior: contain !important;
407
  height: auto !important;
408
  }
409
+
410
  #query-monitor-main #qm-panel-menu ul {
411
  display: block !important;
412
  list-style: none !important;
415
  width: auto !important;
416
  height: auto !important;
417
  }
418
+
419
  #query-monitor-main #qm-panel-menu li {
420
  display: list-item !important;
421
  margin: 0 !important;
422
  padding: 0 !important;
423
  height: auto !important;
424
  }
425
+
426
  #query-monitor-main #qm-panel-menu li button {
427
  background: #f3f3f3 !important;
428
  border-bottom: 1px solid #ddd !important;
435
  text-decoration: none !important;
436
  width: 100% !important;
437
  }
438
+
439
  #query-monitor-main #qm-panel-menu li button:focus,
440
  #query-monitor-main #qm-panel-menu li button:hover {
441
  background: #cde !important;
442
  color: #222 !important;
443
  }
444
+
445
  #query-monitor-main #qm-panel-menu li button:focus {
446
  text-decoration: underline !important;
447
  }
448
+
449
+ #query-monitor-main #qm-panel-menu li button:active {
450
+ text-decoration: none !important;
451
+ background: #0073aa !important;
452
+ color: #fff !important;
453
+ text-shadow: 0 -1px 1px #006291, 1px 0 1px #006291, 0 1px 1px #006291, -1px 0 1px #006291 !important;
454
+ }
455
+
456
  #query-monitor-main #qm-panel-menu li.qm-current-menu button {
457
  background: #def !important;
458
  color: #222 !important;
459
  }
460
+
461
  #query-monitor-main #qm-panel-menu li.qm-current-menu button:focus {
462
  background: #f7fbff !important;
463
  color: #222 !important;
464
  }
465
+
466
  #query-monitor-main #qm-panel-menu li.qm-current-menu button:hover {
467
  background: #cde !important;
468
  color: #222 !important;
469
  }
470
+
471
  #query-monitor-main #qm-panel-menu li li button::before {
472
  content: "\2514" !important;
473
  display: inline-block !important;
474
  margin-right: 5px !important;
475
  }
476
+
477
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"] {
478
  background: #0073aa !important;
479
  color: #fff !important;
480
  text-shadow: 0 -1px 1px #006291, 1px 0 1px #006291, 0 1px 1px #006291, -1px 0 1px #006291 !important;
481
  }
482
+
483
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:focus {
484
  background: #0084c4 !important;
485
  color: #fff !important;
486
  }
487
+
488
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:hover {
489
  background: #0073aa !important;
490
  color: #fff !important;
491
  }
492
+
493
  #query-monitor-main #qm-panel-menu li button[aria-selected="true"]:after {
494
  border: solid 8px transparent;
495
  border-right-color: #fff;
503
  top: 50%;
504
  width: 0;
505
  }
506
+
507
  #query-monitor-main #qm-panels {
508
  flex-grow: 1 !important;
509
  overflow-y: scroll !important;
510
  overscroll-behavior: contain !important;
511
  }
512
+
513
  #query-monitor-main .qm.qm-panel-show {
514
  display: block !important;
515
  }
516
+
517
  #query-monitor-main .qm:focus {
518
  outline: 0 !important;
519
  /* @TODO might not need this any more */
520
  }
521
+
522
  #query-monitor-main .qm-boxed {
523
  display: flex !important;
524
  flex-wrap: wrap !important;
525
  }
526
+
527
  #query-monitor-main .qm-boxed:not(#qm-broken) + .qm-boxed {
528
  border-top: 1px solid #ddd !important;
529
  padding-top: 10px !important;
530
  }
531
+
532
  #query-monitor-main .qm-boxed-wrap {
533
  flex-wrap: wrap !important;
534
  }
535
+
536
  #query-monitor-main .qm .qm-none {
537
  margin: 2em !important;
538
  }
539
+
540
  #query-monitor-main .qm .qm-none p {
541
  font-style: italic !important;
542
  text-align: center !important;
543
  }
544
+
545
  #query-monitor-main .qm table {
546
  border: none !important;
 
547
  border-collapse: collapse !important;
548
+ box-shadow: 0px 1px 0px 0px #aaa !important;
549
  color: #222 !important;
550
  margin: 0 !important;
551
  table-layout: auto !important;
552
  width: 100% !important;
553
  }
554
+
555
  #query-monitor-main .qm table + table {
556
  border-top: 1px solid #e0e0e0 !important;
557
  margin-top: 5px !important;
558
  }
559
+
560
  #query-monitor-main .qm tr {
561
  border: none !important;
562
  }
563
+
564
  #query-monitor-main .qm tbody th,
565
  #query-monitor-main .qm tbody td,
566
  #query-monitor-main .qm tfoot th,
567
  #query-monitor-main .qm tfoot td {
568
  border: 1px solid #e0e0e0 !important;
569
  padding: 5px 5px 4px 5px !important;
570
+ vertical-align: top !important;
571
  }
572
+
573
  #query-monitor-main .qm tbody th,
574
  #query-monitor-main .qm tbody td {
575
  border-bottom: none !important;
576
  border-top: none !important;
577
  }
578
+
579
  #query-monitor-main .qm thead th {
580
  background: #fff !important;
581
  border: 1px solid #e0e0e0 !important;
587
  top: 0 !important;
588
  z-index: 1 !important;
589
  }
590
+
591
+ #query-monitor-main .qm thead th,
592
+ #query-monitor-main .qm thead td {
593
+ vertical-align: top !important;
594
+ }
595
+
596
  #query-monitor-main .qm thead .qm-th {
597
  display: flex !important;
598
  }
599
+
600
  #query-monitor-main .qm tfoot tr td,
601
  #query-monitor-main .qm tfoot tr th {
602
  background: #f3f3f3 !important;
603
+ border: none !important;
 
604
  bottom: 0 !important;
605
  box-shadow: inset 0px 1px 0px #e0e0e0 !important;
606
  position: -webkit-sticky !important;
607
  position: sticky !important;
608
  }
609
+
610
  #query-monitor-main .qm th:first-child,
611
  #query-monitor-main .qm td:first-child {
612
  border-left: none !important;
613
  }
614
+
615
  #query-monitor-main .qm th:last-child,
616
  #query-monitor-main .qm td:last-child {
617
  border-right: none !important;
618
  }
619
+
620
  #query-monitor-main .qm tfoot td.qm-num,
621
  #query-monitor-main .qm tfoot th.qm-num,
622
  #query-monitor-main .qm thead td.qm-num,
623
  #query-monitor-main .qm thead th.qm-num {
624
  width: 5.5em !important;
625
  }
626
+
627
  #query-monitor-main .qm th.qm-num,
628
  #query-monitor-main .qm td.qm-num {
629
  text-align: right !important;
630
  }
631
+
632
  #query-monitor-main .qm td.qm-num {
633
  font-family: Menlo, Monaco, Consolas, monospace !important;
634
  font-size: 11px !important;
635
  line-height: 18px !important;
636
  }
637
+
638
  #query-monitor-main .qm td.qm-row-sql {
639
  min-width: 25em !important;
640
  }
641
+
642
+ #query-monitor-main .qm td.qm-row-block-attrs,
643
  #query-monitor-main .qm td.qm-row-block-html {
644
  max-width: 40em !important;
645
  }
646
+
647
  #query-monitor-main .qm tr.qm-warn td.qm-col-status,
648
  #query-monitor-main .qm td.qm-url,
649
  #query-monitor-main .qm th.qm-col-message,
650
  #query-monitor-main .qm td.qm-row-component {
651
  min-width: 15em !important;
652
  }
653
+
654
+ #query-monitor-main .qm td.qm-has-toggle {
655
+ padding-right: 24px !important;
656
  position: relative !important;
657
  }
658
+
659
  #query-monitor-main .qm td.qm-has-toggle:not(.qm-toggled-on) .qm-supplemental {
660
  display: none;
661
  }
662
+
663
  #query-monitor-main .qm .qm-inner-toggle {
664
  padding: 4px 6px !important;
665
  }
666
+
667
  #query-monitor-main .qm .qm-has-inner .qm-toggled > table {
668
  border-bottom: none !important;
669
  border-top: 1px solid #e0e0e0 !important;
670
  }
671
+
672
  #query-monitor-main .qm td.qm-has-inner .qm-toggler,
673
  #query-monitor-main .qm td.qm-has-inner {
674
  padding: 0 !important;
675
  }
676
+
677
  #query-monitor-main .qm caption h2 {
678
  font-size: 14px !important;
679
  margin: 20px !important;
680
  }
681
+
682
  #query-monitor-main .qm-concerns table {
683
  border-top: 1px solid #e0e0e0 !important;
684
  margin-bottom: 20px !important;
685
  }
686
+
687
  #query-monitor-main .qm-non-tabular {
688
  padding: 10px 20px !important;
689
  }
690
+
691
  #query-monitor-main .qm-non-tabular h3 {
692
  font-size: 14px !important;
693
  margin: 0 0 15px 0 !important;
694
  }
695
+
696
  #query-monitor-main .qm-non-tabular h4 {
697
  font-size: 12px !important;
698
  margin: 20px 0 10px !important;
699
  }
700
+
701
  #query-monitor-main .qm-non-tabular p {
702
  margin-bottom: 10px !important;
703
  }
704
+
705
  #query-monitor-main .qm-non-tabular dl {
706
  display: flex !important;
707
  flex-wrap: wrap !important;
708
  max-width: 60em !important;
709
  }
710
+
711
  #query-monitor-main .qm-non-tabular dt {
712
  border-top: 1px solid #ddd !important;
713
  flex-grow: 0;
714
  flex: 1 0 16em;
715
  padding: 10px 10px 10px 0 !important;
716
  }
717
+
718
  #query-monitor-main .qm-non-tabular dd {
719
  border-top: 1px solid #ddd !important;
720
  flex: 1 0 calc(100% - 10px - 16em);
721
  padding: 10px 0 !important;
722
  }
723
+
724
  #query-monitor-main .qm-non-tabular section,
725
  #query-monitor-main .qm-non-tabular .qm-section {
726
  margin: 0 0 30px 0 !important;
727
  }
728
+
729
  #query-monitor-main .qm-non-tabular .qm-boxed section,
730
  #query-monitor-main .qm-non-tabular .qm-boxed .qm-section {
731
  border-right: 1px solid #ddd !important;
732
  margin: 0 20px 10px 0 !important;
733
  padding: 10px 20px 10px 0 !important;
734
  }
735
+
736
  #query-monitor-main .qm-non-tabular .qm-boxed section:last-child,
737
  #query-monitor-main .qm-non-tabular .qm-boxed .qm-section:last-child {
738
  border-right: none !important;
739
  margin-right: 0 !important;
740
  padding-right: 20px !important;
741
  }
742
+
743
  #query-monitor-main .qm-non-tabular table {
744
  border-bottom-color: #e0e0e0 !important;
745
  }
746
+
747
  #query-monitor-main #qm-conditionals li {
748
  display: inline-block !important;
749
  margin: 0 20px 5px 0 !important;
750
  }
751
+
752
  #query-monitor-main .qm ol,
753
  #query-monitor-main .qm ul {
754
  list-style: none !important;
755
  }
756
+
757
  #query-monitor-main .qm li {
758
  display: list-item !important;
759
  list-style: none !important;
760
  }
761
+
762
  #query-monitor-main .qm li::before {
763
  content: '' !important;
764
  }
765
+
766
  #query-monitor-main .qm code,
767
  #query-monitor-main .qm pre {
768
  font-family: Menlo, Monaco, Consolas, monospace !important;
769
  font-size: 11px !important;
770
  line-height: 18px !important;
771
  }
772
+
773
  #query-monitor-main .qm pre {
774
  background: transparent !important;
775
  height: auto !important;
777
  padding: 0 !important;
778
  width: auto !important;
779
  }
780
+
781
  #query-monitor-main .qm .qm-true code,
782
  #query-monitor-main .qm p.qm-true,
783
  #query-monitor-main .qm span.qm-true,
784
  #query-monitor-main .qm td.qm-true {
785
+ color: #282 !important;
786
  }
787
+
788
  #query-monitor-main .qm .qm-false code,
789
  #query-monitor-main .qm span.qm-false,
790
  #query-monitor-main .qm td.qm-false {
791
  color: #999 !important;
792
  }
793
+
794
  #query-monitor-main .qm .qm-num,
795
  #query-monitor-main .qm code,
796
  #query-monitor-main .qm .qm-nowrap {
797
  white-space: nowrap !important;
798
  }
799
+
800
  #query-monitor-main .qm .qm-wrap code,
801
  #query-monitor-main .qm .qm-wrap {
802
  white-space: normal !important;
803
  word-break: break-all !important;
804
  word-wrap: break-word !important;
805
  }
806
+
807
  #query-monitor-main .qm .qm-pre-wrap code {
808
  white-space: pre-wrap !important;
809
  word-break: break-all !important;
810
  word-wrap: break-word !important;
811
  }
812
+
813
  #query-monitor-main .qm .qm-sticky {
814
  position: sticky !important;
815
  top: 36px !important;
816
  }
817
+
818
  #query-monitor-main .qm .qm-current,
819
  #query-monitor-main .qm td.qm-has-toggle p,
820
  #query-monitor-main .qm .qm-nonselectsql code,
821
  #query-monitor-main .qm .qm-nonselectsql {
822
  color: #a0a !important;
823
  }
824
+
825
  #query-monitor-main .qm .qm-info {
826
+ color: #666 !important;
827
  }
828
+
829
  #query-monitor-main .qm .qm-supplemental {
830
  margin-left: 0.75em !important;
831
  margin-right: 0.75em !important;
832
  }
833
+
834
  #query-monitor-main .qm td.qm-toggled-on .qm-inverse-toggled,
835
  #query-monitor-main .qm td .qm-toggled {
836
  display: none;
837
  }
838
+
839
  #query-monitor-main .qm button.qm-button,
840
  #query-monitor-main .qm .qm-toggle {
841
+ background: #007cba !important;
842
+ border: 1px solid #007cba !important;
843
+ border-radius: 3px !important;
844
  color: #fff !important;
845
  cursor: pointer !important;
846
  font-weight: normal !important;
847
+ text-shadow: none !important;
848
  }
849
+
850
  #query-monitor-main .qm .qm-toggle {
851
  bottom: auto !important;
852
  font-family: Menlo, Monaco, Consolas, monospace !important;
855
  line-height: 16px !important;
856
  padding: 0 !important;
857
  position: absolute !important;
858
+ right: 5px !important;
859
  text-align: center !important;
860
+ top: 5px !important;
861
  width: 18px !important;
862
  }
863
+
864
  #query-monitor-main .qm button {
865
  cursor: pointer !important;
866
  }
867
+
868
  #query-monitor-main .qm button.qm-button {
869
  padding: 4px 10px !important;
870
  }
871
+
872
  #query-monitor-main .qm .qm-has-inner .qm-toggle {
873
  right: 5px !important;
874
  top: 5px !important;
875
  }
876
+
877
  #query-monitor-main .qm button.qm-button:hover,
 
 
878
  #query-monitor-main .qm .qm-toggle:hover {
879
+ background: #0072ab !important;
880
+ border-color: #0072ab !important;
881
  color: #fff !important;
882
  text-decoration: none !important;
883
  }
884
+
885
+ #query-monitor-main .qm button.qm-button:focus,
886
+ #query-monitor-main .qm .qm-toggle:focus {
887
+ background: #0072ab !important;
888
+ border-color: #0072ab !important;
889
+ color: #fff !important;
890
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px #0072ab !important;
891
+ }
892
+
893
+ #query-monitor-main .qm button.qm-button:active,
894
+ #query-monitor-main .qm .qm-toggle:active {
895
+ background: #00689b !important;
896
+ border-color: #00689b !important;
897
+ color: #fff !important;
898
+ box-shadow: none !important;
899
+ }
900
+
901
  #query-monitor-main .qm tbody tr.qm-odd td,
902
  #query-monitor-main .qm tbody tr.qm-odd th {
903
+ background: #f9f9f9 !important;
904
  }
905
+
906
  #query-monitor-main .qm-non-tabular .qm-warn,
907
  #query-monitor-main .qm thead tr .qm-warn,
908
  #query-monitor-main .qm tbody tr .qm-warn {
909
  background-color: #fff0f0 !important;
910
+ color: #900 !important;
911
  }
912
+
913
  #query-monitor-main .qm tbody tr th.qm-warn,
914
  #query-monitor-main .qm tbody tr td.qm-warn,
915
  #query-monitor-main .qm tbody tr.qm-warn td,
916
  #query-monitor-main .qm tbody tr.qm-warn th {
917
  background-color: #fff0f0 !important;
918
+ color: #900 !important;
919
+ }
920
+
921
+ #query-monitor-main .qm tbody tr.qm-odd th.qm-warn,
922
+ #query-monitor-main .qm tbody tr.qm-odd td.qm-warn,
923
+ #query-monitor-main .qm tbody tr.qm-odd.qm-warn td,
924
+ #query-monitor-main .qm tbody tr.qm-odd.qm-warn th {
925
+ background-color: #ffe8e8 !important;
926
  }
927
+
928
  #query-monitor-main .qm-non-tabular .qm-warn code,
929
  #query-monitor-main .qm tbody .qm-warn li,
930
  #query-monitor-main .qm tbody .qm-warn .qm-info,
931
  #query-monitor-main .qm tbody .qm-warn code {
932
  background-color: transparent !important;
933
+ color: #900 !important;
934
  }
935
+
936
  #query-monitor-main .qm .qm-notice {
937
+ background: #def !important;
938
+ border: 1px solid #aad5ff !important;
939
  margin: 0 0 10px 0 !important;
940
  padding: 10px 20px 0 !important;
941
  }
942
+
943
  #query-monitor-main .qm .dashicons {
944
  font-size: 16px !important;
945
  height: 16px !important;
947
  transition: none !important;
948
  width: 16px !important;
949
  }
950
+
951
  #query-monitor-main .qm .qm-dashicons-yes {
952
  background-color: #0a0 !important;
953
  border-radius: 50% !important;
954
  color: #fff !important;
955
  }
956
+
957
+ #query-monitor-main .qm tbody tr.qm-odd.qm-hovered th,
958
+ #query-monitor-main .qm tbody tr.qm-odd.qm-hovered td,
959
+ #query-monitor-main .qm tbody tr.qm-odd:hover th,
960
+ #query-monitor-main .qm tbody tr.qm-odd:hover td,
961
  #query-monitor-main .qm tbody tr.qm-hovered th,
962
  #query-monitor-main .qm tbody tr.qm-hovered td,
963
  #query-monitor-main .qm tbody tr:hover th,
964
  #query-monitor-main .qm tbody tr:hover td {
965
  background: #eef3fa !important;
966
  }
967
+
968
  #query-monitor-main .qm thead th.qm-filtered select.qm-filter {
969
  background-color: #ffd !important;
970
  color: #222 !important;
971
  }
972
+
973
  #query-monitor-main .qm tbody tr td.qm-highlight,
974
  #query-monitor-main .qm tbody tr.qm-highlight td {
975
  background-color: #ffd !important;
977
  box-shadow: inset 0 -1px #eec !important;
978
  color: #222 !important;
979
  }
980
+
981
  #query-monitor-main .qm button.qm-filter-trigger,
982
  #query-monitor-main .qm button.qm-filter-trigger code,
983
  #query-monitor-main .qm tbody .qm-warn a code,
987
  cursor: pointer !important;
988
  text-decoration: none !important;
989
  }
990
+
991
  #query-monitor-main .qm button.qm-filter-trigger:after, #query-monitor-main .qm button.qm-filter-trigger:focus, #query-monitor-main .qm button.qm-filter-trigger:hover,
992
  #query-monitor-main .qm button.qm-filter-trigger code:after,
993
  #query-monitor-main .qm button.qm-filter-trigger code:focus,
1004
  color: #0096dd !important;
1005
  text-decoration: underline !important;
1006
  }
1007
+
1008
+ #query-monitor-main .qm button.qm-filter-trigger:active,
1009
+ #query-monitor-main .qm button.qm-filter-trigger code:active,
1010
+ #query-monitor-main .qm tbody .qm-warn a code:active,
1011
+ #query-monitor-main .qm a code:active,
1012
+ #query-monitor-main .qm a:active {
1013
+ color: #11b2ff !important;
1014
+ text-decoration: underline !important;
1015
+ }
1016
+
1017
  #query-monitor-main .qm a.qm-external-link:after,
1018
  #query-monitor-main .qm a.qm-link:after,
1019
  #query-monitor-main .qm a.qm-edit-link:after,
1020
  #query-monitor-main .qm button.qm-filter-trigger:after {
1021
  display: inline-block !important;
1022
  font-family: dashicons !important;
1023
+ font-size: 14px !important;
1024
  left: 2px !important;
1025
  line-height: 15px !important;
1026
  position: relative !important;
1028
  top: 2px !important;
1029
  visibility: hidden !important;
1030
  }
1031
+
1032
  #query-monitor-main .qm a.qm-external-link:after,
1033
  #query-monitor-main .qm a.qm-link:hover:after,
1034
  #query-monitor-main .qm a.qm-link:focus:after,
1038
  #query-monitor-main .qm button.qm-filter-trigger:focus:after {
1039
  visibility: visible !important;
1040
  }
1041
+
1042
  #query-monitor-main .qm button.qm-filter-trigger:after {
1043
  content: '\f536' !important;
1044
  }
1045
+
1046
  #query-monitor-main .qm a.qm-edit-link:after {
1047
  content: '\f464' !important;
1048
  }
1049
+
1050
  #query-monitor-main .qm a.qm-external-link:after,
1051
  #query-monitor-main .qm a.qm-link:after {
1052
  content: '\f504' !important;
1053
  }
1054
+
1055
  #query-monitor-main #qm-ajax-errors {
1056
  display: none;
1057
  }
1058
+
1059
  #query-monitor-main button,
1060
  #query-monitor-main select {
1061
  background: none !important;
1064
  margin: 0 !important;
1065
  width: auto !important;
1066
  }
1067
+
1068
  #query-monitor-main .qm label {
1069
  color: #222 !important;
1070
  cursor: pointer !important;
1073
  font-weight: normal !important;
1074
  margin: 0 !important;
1075
  }
1076
+
1077
  #query-monitor-main .qm thead label {
1078
  flex-grow: 1 !important;
1079
  }
1080
+
1081
  #query-monitor-main .qm .qm-filter-container {
1082
  display: flex !important;
1083
  }
1084
+
1085
  #query-monitor-main .qm .qm-filter-container label {
1086
  cursor: default !important;
1087
  white-space: nowrap !important;
1088
  }
1089
+
1090
  #query-monitor-main .qm .qm-filter-container div {
1091
  /* Some themes use Select2 etc on all selects. This hides that. */
1092
  display: none !important;
1093
  }
1094
+
1095
  #query-monitor-main .qm select.qm-filter {
1096
  -webkit-appearance: menulist !important;
1097
  -moz-appearance: menulist !important;
1105
  height: auto !important;
1106
  letter-spacing: normal !important;
1107
  margin: 0 0 0 5px !important;
1108
+ max-width: 12em !important;
1109
  outline: 1px solid #aaa !important;
1110
  padding: 0 !important;
1111
  width: auto !important;
1112
  }
1113
+
1114
  #query-monitor-main .qm select.qm-filter:hover {
1115
  background: #f3f3f3 !important;
1116
  }
1117
+
1118
  #query-monitor-main .qm-hide,
1119
  #query-monitor-main .qm-hide-scripts-dependencies,
1120
  #query-monitor-main .qm-hide-styles-dependencies,
1130
  #query-monitor-main .qm-hide-component {
1131
  display: none !important;
1132
  }
1133
+
1134
  #query-monitor-main .qm thead th.qm-sortable-column {
1135
  cursor: pointer !important;
1136
  }
1137
+
1138
  #query-monitor-main .qm thead th.qm-sortable-column:hover {
1139
  background: #f3f3f3 !important;
1140
  }
1141
+
1142
  #query-monitor-main .qm .qm-sort-heading {
1143
  flex-grow: 1 !important;
1144
  }
1145
+
1146
  #query-monitor-main .qm .qm-sort-controls {
1147
  flex-shrink: 0 !important;
1148
  text-align: right !important;
1149
  }
1150
+
1151
  #query-monitor-main .qm .qm-sortable-column .qm-sort-arrow {
1152
  color: #ccc !important;
1153
  display: block !important;
1157
  margin: 0 !important;
1158
  width: 16px !important;
1159
  }
1160
+
1161
  #query-monitor-main .qm .qm-sortable-column .qm-sort-arrow::before {
1162
  content: "\f140" !important;
1163
  position: absolute !important;
1164
  right: 0 !important;
1165
  top: 4px !important;
1166
  }
1167
+
1168
  #query-monitor-main .qm .qm-sorted-desc .qm-sort-arrow,
1169
  #query-monitor-main .qm .qm-sorted-asc .qm-sort-arrow {
1170
  color: #222 !important;
1171
  }
1172
+
1173
  #query-monitor-main .qm thead th.qm-sortable-column:hover .qm-sort-arrow {
1174
  color: #0073aa !important;
1175
  }
1176
+
1177
  #query-monitor-main .qm .qm-sortable-column.qm-sorted-asc .qm-sort-arrow::before {
1178
  content: "\f142" !important;
1179
  }
1180
+
1181
  #query-monitor-main .qm button:focus,
1182
  #query-monitor-main .qm a:focus,
1183
  #query-monitor-main .qm select:focus {
1184
+ box-shadow: 0 0 0 1px #fff, 0 0 0 3px #0072ab !important;
1185
+ }
1186
+
1187
+ #query-monitor-main .qm button:active,
1188
+ #query-monitor-main .qm a:active,
1189
+ #query-monitor-main .qm select:active {
1190
+ box-shadow: none !important;
1191
  }
1192
+
1193
  #query-monitor-main .qm-screen-reader-text,
1194
  #query-monitor-main .screen-reader-text {
1195
  border: 0 !important;
1201
  position: absolute !important;
1202
  width: 1px !important;
1203
  }
1204
+
1205
  @media screen and (max-width: 782px) {
1206
  #query-monitor-main #qm-panel-menu,
1207
  #query-monitor-main #qm-title h1.qm-title-heading {
1211
  display: block;
1212
  }
1213
  }
1214
+
1215
  #query-monitor-main [data-qm-state="off"] [data-qm-state-visibility="on"],
1216
  #query-monitor-main [data-qm-state="on"] [data-qm-state-visibility="off"] {
1217
  display: none;
1218
  }
1219
+
1220
+ #query-monitor-main.qm-no-js .qm-sort-controls,
1221
+ #query-monitor-main.qm-no-js .qm-toggle,
1222
+ #query-monitor-main.qm-no-js select.qm-filter {
1223
  display: none !important;
1224
  }
1225
+
1226
  #query-monitor-main .qm.qm-debug-bar textarea,
1227
  #query-monitor-main .qm.qm-debug-bar pre {
1228
  border: 1px solid #ddd !important;
1229
  margin: 4px 0 !important;
1230
  padding: 10px !important;
1231
  }
1232
+
1233
  #query-monitor-main .qm.qm-debug-bar textarea {
1234
  resize: vertical !important;
1235
  }
1236
+
1237
  #query-monitor-main .qm.qm-debug-bar .left {
1238
  float: left !important;
1239
  }
1240
+
1241
  #query-monitor-main .qm.qm-debug-bar .right {
1242
  float: right !important;
1243
  }
1244
+
1245
  #query-monitor-main .qm.qm-debug-bar h2 {
1246
  font-size: 14px !important;
1247
  margin: 4px 6px 15px !important;
1248
  }
1249
+
1250
  #query-monitor-main .qm.qm-debug-bar h3 {
1251
  clear: none !important;
1252
  float: left !important;
1257
  padding: 5px 10px 15px !important;
1258
  text-align: center !important;
1259
  }
1260
+
1261
  #query-monitor-main .qm.qm-debug-bar h3 small {
1262
  font-size: 14px !important;
1263
  }
1264
+
1265
  #query-monitor-main .qm.qm-debug-bar h3 span {
1266
  display: block !important;
1267
  margin-bottom: 8px !important;
1268
  white-space: nowrap !important;
1269
  }
1270
+
1271
  #query-monitor-main .qm.qm-debug-bar h4 {
1272
  font-size: 13px !important;
1273
  margin: 15px 6px 5px !important;
1274
  }
1275
+
1276
  #query-monitor-main .qm.qm-debug-bar .qm-debug-bar-output {
1277
  position: relative !important;
1278
  }
1279
+
1280
  #query-monitor-main .qm.qm-debug-bar .qm-debug-bar-output table {
1281
  margin-bottom: 4px !important;
1282
  margin-top: 4px !important;
1283
  }
1284
+
1285
  #query-monitor-main #debug-menu-target-Debug_Bar_Console {
1286
  min-height: 400px !important;
1287
  }
1288
+
1289
  #query-monitor-main #debug-menu-target-Debug_Bar_Cache_Lookup,
1290
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules,
1291
  #query-monitor-main #debug-menu-target-Debug_Bar_Widgets {
1292
  margin: 4px 6px !important;
1293
  }
1294
+
1295
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules_Panel .filterui,
1296
  #query-monitor-main #debug-menu-target-Debug_Bar_Rewrite_Rules_Panel .dbrr {
1297
  margin: 0 !important;
1298
  }
1299
+
1300
  #query-monitor-main.qm-broken #qm-title {
1301
  cursor: default !important;
1302
  }
1303
+
1304
+ #query-monitor-main #qm-broken,
1305
+ #query-monitor-main.qm-broken .qm-title-button {
1306
  display: none !important;
1307
  }
1308
+
1309
+ #query-monitor-main.qm-broken #qm-broken,
1310
+ #query-monitor-main.qm-broken .qm {
1311
  display: block !important;
1312
  }
1313
+
1314
  #query-monitor-main.qm-broken .qm {
1315
  margin-bottom: 50px !important;
1316
  }
1317
+
1318
  #query-monitor-main.qm-broken #qm-broken h2 {
1319
  padding: 20px !important;
1320
  }
assets/query-monitor.js CHANGED
@@ -370,22 +370,51 @@ if ( window.jQuery ) {
370
  e.preventDefault();
371
  });
372
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
  $.qm.tableSort({target: $('.qm-sortable')});
374
 
375
  var startY, startX, resizerHeight;
376
 
377
- $(document).on('mousedown', '.qm-resizer', function(event) {
378
  resizerHeight = $(this).outerHeight() - 1;
379
- startY = container.outerHeight() + event.clientY;
380
- startX = container.outerWidth() + event.clientX;
381
 
382
- $(document).on('mousemove', qm_do_resizer_drag);
383
- $(document).on('mouseup', qm_stop_resizer_drag);
384
  });
385
 
386
  function qm_do_resizer_drag(event) {
387
  if ( ! container.hasClass('qm-show-right') ) {
388
- var h = ( startY - event.clientY );
389
  if ( h >= resizerHeight && h <= maxheight ) {
390
  container.height( h );
391
  }
@@ -398,8 +427,8 @@ if ( window.jQuery ) {
398
  }
399
 
400
  function qm_stop_resizer_drag(event) {
401
- $(document).off('mousemove', qm_do_resizer_drag);
402
- $(document).off('mouseup', qm_stop_resizer_drag);
403
 
404
  if ( ! container.hasClass('qm-show-right') ) {
405
  localStorage.removeItem( container_position_key );
370
  e.preventDefault();
371
  });
372
 
373
+ var editorSuccessIndicator = $('#qm-editor-save-status');
374
+ editorSuccessIndicator.hide();
375
+
376
+ $('.qm-editor-button').on('click',function(e){
377
+ var state = $('#qm-settings').data('qm-state');
378
+ var editor = $('#qm-editor-select').val();
379
+
380
+ $.ajax(qm_l10n.ajaxurl,{
381
+ type : 'POST',
382
+ context : this,
383
+ data : {
384
+ action : 'qm_editor_set',
385
+ nonce : qm_l10n.auth_nonce['editor-set'],
386
+ editor : editor
387
+ },
388
+ success : function(response){
389
+ if (response.success) {
390
+ editorSuccessIndicator.show();
391
+ }
392
+ },
393
+ dataType : 'json',
394
+ xhrFields: {
395
+ withCredentials: true
396
+ }
397
+ });
398
+
399
+ e.preventDefault();
400
+ });
401
+
402
  $.qm.tableSort({target: $('.qm-sortable')});
403
 
404
  var startY, startX, resizerHeight;
405
 
406
+ $(document).on('mousedown touchstart', '.qm-resizer', function(event) {
407
  resizerHeight = $(this).outerHeight() - 1;
408
+ startY = container.outerHeight() + ( event.clientY || event.originalEvent.targetTouches[0].pageY );
409
+ startX = container.outerWidth() + ( event.clientX || event.originalEvent.targetTouches[0].pageX );
410
 
411
+ $(document).on('mousemove touchmove', qm_do_resizer_drag);
412
+ $(document).on('mouseup touchend', qm_stop_resizer_drag);
413
  });
414
 
415
  function qm_do_resizer_drag(event) {
416
  if ( ! container.hasClass('qm-show-right') ) {
417
+ var h = ( startY - ( event.clientY || event.originalEvent.targetTouches[0].pageY ) );
418
  if ( h >= resizerHeight && h <= maxheight ) {
419
  container.height( h );
420
  }
427
  }
428
 
429
  function qm_stop_resizer_drag(event) {
430
+ $(document).off('mousemove touchmove', qm_do_resizer_drag);
431
+ $(document).off('mouseup touchend', qm_stop_resizer_drag);
432
 
433
  if ( ! container.hasClass('qm-show-right') ) {
434
  localStorage.removeItem( container_position_key );
classes/Collector.php CHANGED
@@ -26,8 +26,6 @@ abstract class QM_Collector {
26
  return "qm-{$this->id}";
27
  }
28
 
29
- abstract public function name();
30
-
31
  protected function log_type( $type ) {
32
 
33
  if ( isset( $this->data['types'][ $type ] ) ) {
@@ -44,6 +42,7 @@ abstract class QM_Collector {
44
  $sql = str_replace( array( "\t", '`' ), '', $sql );
45
  $sql = preg_replace( '/ +/', ' ', $sql );
46
  $sql = trim( $sql );
 
47
 
48
  $this->data['dupes'][ $sql ][] = $i;
49
 
@@ -80,6 +79,8 @@ abstract class QM_Collector {
80
  if ( ! defined( $constant ) ) {
81
  /* translators: Undefined PHP constant */
82
  return __( 'undefined', 'query-monitor' );
 
 
83
  } elseif ( ! constant( $constant ) ) {
84
  return 'false';
85
  } else {
@@ -215,6 +216,10 @@ abstract class QM_Collector {
215
  return $user;
216
  }
217
 
 
 
 
 
218
  public static function hide_qm() {
219
  if ( null === self::$hide_qm ) {
220
  self::$hide_qm = ( defined( 'QM_HIDE_SELF' ) && QM_HIDE_SELF );
26
  return "qm-{$this->id}";
27
  }
28
 
 
 
29
  protected function log_type( $type ) {
30
 
31
  if ( isset( $this->data['types'][ $type ] ) ) {
42
  $sql = str_replace( array( "\t", '`' ), '', $sql );
43
  $sql = preg_replace( '/ +/', ' ', $sql );
44
  $sql = trim( $sql );
45
+ $sql = rtrim( $sql, ';' );
46
 
47
  $this->data['dupes'][ $sql ][] = $i;
48
 
79
  if ( ! defined( $constant ) ) {
80
  /* translators: Undefined PHP constant */
81
  return __( 'undefined', 'query-monitor' );
82
+ } elseif ( is_string( constant( $constant ) ) && ! is_numeric( constant( $constant ) ) ) {
83
+ return constant( $constant );
84
  } elseif ( ! constant( $constant ) ) {
85
  return 'false';
86
  } else {
216
  return $user;
217
  }
218
 
219
+ public static function enabled() {
220
+ return true;
221
+ }
222
+
223
  public static function hide_qm() {
224
  if ( null === self::$hide_qm ) {
225
  self::$hide_qm = ( defined( 'QM_HIDE_SELF' ) && QM_HIDE_SELF );
classes/Dispatcher.php CHANGED
@@ -28,6 +28,9 @@ abstract class QM_Dispatcher {
28
  if ( ! defined( 'QM_COOKIE' ) ) {
29
  define( 'QM_COOKIE', 'wp-query_monitor_' . COOKIEHASH );
30
  }
 
 
 
31
 
32
  add_action( 'init', array( $this, 'init' ) );
33
 
@@ -127,6 +130,13 @@ abstract class QM_Dispatcher {
127
  return false;
128
  }
129
 
 
 
 
 
 
 
 
130
  public static function verify_cookie( $value ) {
131
  $old_user_id = wp_validate_auth_cookie( $value, 'logged_in' );
132
  if ( $old_user_id ) {
28
  if ( ! defined( 'QM_COOKIE' ) ) {
29
  define( 'QM_COOKIE', 'wp-query_monitor_' . COOKIEHASH );
30
  }
31
+ if ( ! defined( 'QM_EDITOR_COOKIE' ) ) {
32
+ define( 'QM_EDITOR_COOKIE', 'wp-query_monitor_editor_' . COOKIEHASH );
33
+ }
34
 
35
  add_action( 'init', array( $this, 'init' ) );
36
 
130
  return false;
131
  }
132
 
133
+ public static function editor_cookie() {
134
+ if ( isset( $_COOKIE[QM_EDITOR_COOKIE] ) ) { // @codingStandardsIgnoreLine
135
+ return $_COOKIE[QM_EDITOR_COOKIE]; // @codingStandardsIgnoreLine
136
+ }
137
+ return '';
138
+ }
139
+
140
  public static function verify_cookie( $value ) {
141
  $old_user_id = wp_validate_auth_cookie( $value, 'logged_in' );
142
  if ( $old_user_id ) {
classes/Hook.php CHANGED
@@ -46,7 +46,7 @@ class QM_Hook {
46
  }
47
  }
48
 
49
- $parts = array_filter( preg_split( '#[_/-]#', $name ) );
50
 
51
  return array(
52
  'name' => $name,
46
  }
47
  }
48
 
49
+ $parts = array_values( array_filter( preg_split( '#[_/-]#', $name ) ) );
50
 
51
  return array(
52
  'name' => $name,
collectors/admin.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_Admin extends QM_Collector {
9
 
10
  public $id = 'response';
11
 
12
- public function name() {
13
- return __( 'Admin Screen', 'query-monitor' );
14
- }
15
-
16
  public function get_concerned_actions() {
17
  $actions = array(
18
  'current_screen',
9
 
10
  public $id = 'response';
11
 
 
 
 
 
12
  public function get_concerned_actions() {
13
  $actions = array(
14
  'current_screen',
collectors/assets.php CHANGED
@@ -104,6 +104,8 @@ abstract class QM_Collector_Assets extends QM_Collector {
104
  $all_dependencies = array();
105
  $all_dependents = array();
106
 
 
 
107
  foreach ( $positions as $position ) {
108
  if ( empty( $this->data[ $position ] ) ) {
109
  continue;
@@ -140,8 +142,8 @@ abstract class QM_Collector_Assets extends QM_Collector {
140
 
141
  foreach ( $dependencies as & $dep ) {
142
  if ( ! $raw->query( $dep ) ) {
143
- /* translators: %s: Script or style dependency name */
144
- $dep = sprintf( __( '%s (missing)', 'query-monitor' ), $dep );
145
  }
146
  }
147
 
@@ -170,6 +172,8 @@ abstract class QM_Collector_Assets extends QM_Collector {
170
  $all_dependents = array_unique( $all_dependents );
171
  sort( $all_dependents );
172
  $this->data['dependents'] = $all_dependents;
 
 
173
  }
174
 
175
  protected static function get_broken_dependencies( _WP_Dependency $item, WP_Dependencies $dependencies ) {
@@ -231,7 +235,7 @@ abstract class QM_Collector_Assets extends QM_Collector {
231
  $host = $http_host;
232
  }
233
 
234
- if ( $scheme && $data['is_ssl'] && ( 'https' !== $scheme ) ) {
235
  $source = new WP_Error( 'qm_insecure_content', __( 'Insecure content', 'query-monitor' ), array(
236
  'src' => $source,
237
  ) );
104
  $all_dependencies = array();
105
  $all_dependents = array();
106
 
107
+ $missing_dependencies = array();
108
+
109
  foreach ( $positions as $position ) {
110
  if ( empty( $this->data[ $position ] ) ) {
111
  continue;
142
 
143
  foreach ( $dependencies as & $dep ) {
144
  if ( ! $raw->query( $dep ) ) {
145
+ // A missing dependency is a dependecy on an asset that doesn't exist
146
+ $missing_dependencies[ $dep ] = true;
147
  }
148
  }
149
 
172
  $all_dependents = array_unique( $all_dependents );
173
  sort( $all_dependents );
174
  $this->data['dependents'] = $all_dependents;
175
+
176
+ $this->data['missing_dependencies'] = $missing_dependencies;
177
  }
178
 
179
  protected static function get_broken_dependencies( _WP_Dependency $item, WP_Dependencies $dependencies ) {
235
  $host = $http_host;
236
  }
237
 
238
+ if ( $scheme && $data['is_ssl'] && ( 'https' !== $scheme ) && ( 'localhost' !== $host ) ) {
239
  $source = new WP_Error( 'qm_insecure_content', __( 'Insecure content', 'query-monitor' ), array(
240
  'src' => $source,
241
  ) );
collectors/assets_scripts.php CHANGED
@@ -27,11 +27,6 @@ class QM_Collector_Assets_Scripts extends QM_Collector_Assets {
27
  'script_loader_tag',
28
  );
29
  }
30
-
31
- public function name() {
32
- return __( 'Scripts', 'query-monitor' );
33
- }
34
-
35
  }
36
 
37
  function register_qm_collector_assets_scripts( array $collectors, QueryMonitor $qm ) {
27
  'script_loader_tag',
28
  );
29
  }
 
 
 
 
 
30
  }
31
 
32
  function register_qm_collector_assets_scripts( array $collectors, QueryMonitor $qm ) {
collectors/assets_styles.php CHANGED
@@ -20,11 +20,6 @@ class QM_Collector_Assets_Styles extends QM_Collector_Assets {
20
  'style_loader_tag',
21
  );
22
  }
23
-
24
- public function name() {
25
- return __( 'Styles', 'query-monitor' );
26
- }
27
-
28
  }
29
 
30
  function register_qm_collector_assets_styles( array $collectors, QueryMonitor $qm ) {
20
  'style_loader_tag',
21
  );
22
  }
 
 
 
 
 
23
  }
24
 
25
  function register_qm_collector_assets_styles( array $collectors, QueryMonitor $qm ) {
collectors/block_editor.php CHANGED
@@ -12,10 +12,6 @@ class QM_Collector_Block_Editor extends QM_Collector {
12
  protected $block_timing = array();
13
  protected $block_timer = null;
14
 
15
- public function name() {
16
- return __( 'Blocks', 'query-monitor' );
17
- }
18
-
19
  public function __construct() {
20
  parent::__construct();
21
 
@@ -98,9 +94,10 @@ class QM_Collector_Block_Editor extends QM_Collector {
98
 
99
  $timing = array_shift( $this->block_timing );
100
 
101
- $block['dynamic'] = $dynamic;
102
- $block['callback'] = $callback;
103
- $block['size'] = strlen( $block['innerHTML'] );
 
104
 
105
  if ( $timing ) {
106
  $block['timing'] = $timing->get_time();
12
  protected $block_timing = array();
13
  protected $block_timer = null;
14
 
 
 
 
 
15
  public function __construct() {
16
  parent::__construct();
17
 
94
 
95
  $timing = array_shift( $this->block_timing );
96
 
97
+ $block['dynamic'] = $dynamic;
98
+ $block['callback'] = $callback;
99
+ $block['innerHTML'] = trim( $block['innerHTML'] );
100
+ $block['size'] = strlen( $block['innerHTML'] );
101
 
102
  if ( $timing ) {
103
  $block['timing'] = $timing->get_time();
collectors/cache.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_Cache extends QM_Collector {
9
 
10
  public $id = 'cache';
11
 
12
- public function name() {
13
- return __( 'Cache', 'query-monitor' );
14
- }
15
-
16
  public function process() {
17
  global $wp_object_cache;
18
 
9
 
10
  public $id = 'cache';
11
 
 
 
 
 
12
  public function process() {
13
  global $wp_object_cache;
14
 
collectors/caps.php CHANGED
@@ -9,19 +9,21 @@ class QM_Collector_Caps extends QM_Collector {
9
 
10
  public $id = 'caps';
11
 
12
- public function name() {
13
- return __( 'Capability Checks', 'query-monitor' );
14
- }
15
-
16
  public function __construct() {
17
  parent::__construct();
18
- if ( ! defined( 'QM_ENABLE_CAPS_PANEL' ) || ! QM_ENABLE_CAPS_PANEL ) {
 
19
  return;
20
  }
 
21
  add_filter( 'user_has_cap', array( $this, 'filter_user_has_cap' ), 9999, 3 );
22
  add_filter( 'map_meta_cap', array( $this, 'filter_map_meta_cap' ), 9999, 4 );
23
  }
24
 
 
 
 
 
25
  public function get_concerned_actions() {
26
  return array(
27
  'wp_roles_init',
@@ -141,10 +143,10 @@ class QM_Collector_Caps extends QM_Collector {
141
  $all_users = array();
142
  $components = array();
143
 
144
- $this->data['caps'] = array_filter( $this->data['caps'], array( $this, 'filter_remove_noise' ) );
145
 
146
  if ( self::hide_qm() ) {
147
- $this->data['caps'] = array_filter( $this->data['caps'], array( $this, 'filter_remove_qm' ) );
148
  }
149
 
150
  foreach ( $this->data['caps'] as $i => $cap ) {
@@ -154,19 +156,46 @@ class QM_Collector_Caps extends QM_Collector {
154
  $name = '';
155
  }
156
 
157
- $parts = array_filter( preg_split( '#[_/-]#', $name ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  $this->data['caps'][ $i ]['parts'] = $parts;
159
  $this->data['caps'][ $i ]['name'] = $name;
160
  $this->data['caps'][ $i ]['user'] = $cap['args'][1];
161
  $this->data['caps'][ $i ]['args'] = array_slice( $cap['args'], 2 );
162
  $all_parts = array_merge( $all_parts, $parts );
163
  $all_users[] = $cap['args'][1];
164
- $component = $cap['trace']->get_component();
165
  $components[ $component->name ] = $component->name;
 
 
166
  }
167
 
168
- $this->data['parts'] = array_unique( array_filter( $all_parts ) );
169
- $this->data['users'] = array_unique( array_filter( $all_users ) );
170
  $this->data['components'] = $components;
171
  }
172
 
9
 
10
  public $id = 'caps';
11
 
 
 
 
 
12
  public function __construct() {
13
  parent::__construct();
14
+
15
+ if ( ! self::enabled() ) {
16
  return;
17
  }
18
+
19
  add_filter( 'user_has_cap', array( $this, 'filter_user_has_cap' ), 9999, 3 );
20
  add_filter( 'map_meta_cap', array( $this, 'filter_map_meta_cap' ), 9999, 4 );
21
  }
22
 
23
+ public static function enabled() {
24
+ return ( defined( 'QM_ENABLE_CAPS_PANEL' ) && QM_ENABLE_CAPS_PANEL );
25
+ }
26
+
27
  public function get_concerned_actions() {
28
  return array(
29
  'wp_roles_init',
143
  $all_users = array();
144
  $components = array();
145
 
146
+ $this->data['caps'] = array_values( array_filter( $this->data['caps'], array( $this, 'filter_remove_noise' ) ) );
147
 
148
  if ( self::hide_qm() ) {
149
+ $this->data['caps'] = array_values( array_filter( $this->data['caps'], array( $this, 'filter_remove_qm' ) ) );
150
  }
151
 
152
  foreach ( $this->data['caps'] as $i => $cap ) {
156
  $name = '';
157
  }
158
 
159
+ $trace = $cap['trace']->get_trace();
160
+ $filtered_trace = $cap['trace']->get_display_trace();
161
+
162
+ $last = end( $filtered_trace );
163
+ if ( isset( $last['function'] ) && 'map_meta_cap' === $last['function'] ) {
164
+ array_shift( $filtered_trace ); // remove the map_meta_cap() call
165
+ }
166
+
167
+ array_shift( $filtered_trace ); // remove the WP_User->has_cap() call
168
+ array_shift( $filtered_trace ); // remove the *_user_can() call
169
+
170
+ if ( ! count( $filtered_trace ) ) {
171
+ $responsible_name = QM_Util::standard_dir( $trace[1]['file'], '' ) . ':' . $trace[1]['line'];
172
+
173
+ $responsible_item = $trace[1];
174
+ $responsible_item['display'] = $responsible_name;
175
+ $responsible_item['calling_file'] = $trace[1]['file'];
176
+ $responsible_item['calling_line'] = $trace[1]['line'];
177
+ array_unshift( $filtered_trace, $responsible_item );
178
+ }
179
+
180
+ $component = $cap['trace']->get_component();
181
+
182
+ $this->data['caps'][ $i ]['filtered_trace'] = $filtered_trace;
183
+ $this->data['caps'][ $i ]['component'] = $component;
184
+
185
+ $parts = array_values( array_filter( preg_split( '#[_/-]#', $name ) ) );
186
  $this->data['caps'][ $i ]['parts'] = $parts;
187
  $this->data['caps'][ $i ]['name'] = $name;
188
  $this->data['caps'][ $i ]['user'] = $cap['args'][1];
189
  $this->data['caps'][ $i ]['args'] = array_slice( $cap['args'], 2 );
190
  $all_parts = array_merge( $all_parts, $parts );
191
  $all_users[] = $cap['args'][1];
 
192
  $components[ $component->name ] = $component->name;
193
+
194
+ unset( $this->data['caps'][ $i ]['trace'] );
195
  }
196
 
197
+ $this->data['parts'] = array_values( array_unique( array_filter( $all_parts ) ) );
198
+ $this->data['users'] = array_values( array_unique( array_filter( $all_users ) ) );
199
  $this->data['components'] = $components;
200
  }
201
 
collectors/conditionals.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_Conditionals extends QM_Collector {
9
 
10
  public $id = 'conditionals';
11
 
12
- public function name() {
13
- return __( 'Conditionals', 'query-monitor' );
14
- }
15
-
16
  public function process() {
17
 
18
  /**
9
 
10
  public $id = 'conditionals';
11
 
 
 
 
 
12
  public function process() {
13
 
14
  /**
collectors/db_callers.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_DB_Callers extends QM_Collector {
9
 
10
  public $id = 'db_callers';
11
 
12
- public function name() {
13
- return __( 'Queries by Caller', 'query-monitor' );
14
- }
15
-
16
  public function process() {
17
  $dbq = QM_Collectors::get( 'db_queries' );
18
 
9
 
10
  public $id = 'db_callers';
11
 
 
 
 
 
12
  public function process() {
13
  $dbq = QM_Collectors::get( 'db_queries' );
14
 
collectors/db_components.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_DB_Components extends QM_Collector {
9
 
10
  public $id = 'db_components';
11
 
12
- public function name() {
13
- return __( 'Queries by Component', 'query-monitor' );
14
- }
15
-
16
  public function process() {
17
  $dbq = QM_Collectors::get( 'db_queries' );
18
 
9
 
10
  public $id = 'db_components';
11
 
 
 
 
 
12
  public function process() {
13
  $dbq = QM_Collectors::get( 'db_queries' );
14
 
collectors/db_dupes.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_DB_Dupes extends QM_Collector {
9
 
10
  public $id = 'db_dupes';
11
 
12
- public function name() {
13
- return __( 'Duplicate Queries', 'query-monitor' );
14
- }
15
-
16
  public function process() {
17
  $dbq = QM_Collectors::get( 'db_queries' );
18
 
9
 
10
  public $id = 'db_dupes';
11
 
 
 
 
 
12
  public function process() {
13
  $dbq = QM_Collectors::get( 'db_queries' );
14
 
collectors/db_queries.php CHANGED
@@ -21,10 +21,6 @@ class QM_Collector_DB_Queries extends QM_Collector {
21
  public $id = 'db_queries';
22
  public $db_objects = array();
23
 
24
- public function name() {
25
- return __( 'Database Queries', 'query-monitor' );
26
- }
27
-
28
  public function get_errors() {
29
  if ( ! empty( $this->data['errors'] ) ) {
30
  return $this->data['errors'];
@@ -205,8 +201,8 @@ class QM_Collector_DB_Queries extends QM_Collector {
205
  // Fallback for displaying database errors when wp-content/db.php isn't in place
206
  foreach ( $EZSQL_ERROR as $error ) {
207
  $row = array(
208
- 'caller' => __( 'Unknown', 'query-monitor' ),
209
- 'caller_name' => __( 'Unknown', 'query-monitor' ),
210
  'stack' => '',
211
  'sql' => $error['query'],
212
  'ltime' => 0,
21
  public $id = 'db_queries';
22
  public $db_objects = array();
23
 
 
 
 
 
24
  public function get_errors() {
25
  if ( ! empty( $this->data['errors'] ) ) {
26
  return $this->data['errors'];
201
  // Fallback for displaying database errors when wp-content/db.php isn't in place
202
  foreach ( $EZSQL_ERROR as $error ) {
203
  $row = array(
204
+ 'caller' => null,
205
+ 'caller_name' => null,
206
  'stack' => '',
207
  'sql' => $error['query'],
208
  'ltime' => 0,
collectors/debug_bar.php CHANGED
@@ -14,15 +14,6 @@ final class QM_Collector_Debug_Bar extends QM_Collector {
14
  parent::__construct();
15
  }
16
 
17
- public function name() {
18
- $title = $this->get_panel()->title();
19
- return sprintf(
20
- /* translators: Debug Bar add-on name */
21
- __( 'Debug Bar: %s', 'query-monitor' ),
22
- $title
23
- );
24
- }
25
-
26
  public function set_panel( Debug_Bar_Panel $panel ) {
27
  $this->panel = $panel;
28
  }
14
  parent::__construct();
15
  }
16
 
 
 
 
 
 
 
 
 
 
17
  public function set_panel( Debug_Bar_Panel $panel ) {
18
  $this->panel = $panel;
19
  }
collectors/environment.php CHANGED
@@ -17,10 +17,6 @@ class QM_Collector_Environment extends QM_Collector {
17
  'log_errors',
18
  );
19
 
20
- public function name() {
21
- return __( 'Environment', 'query-monitor' );
22
- }
23
-
24
  public function __construct() {
25
 
26
  global $wpdb;
17
  'log_errors',
18
  );
19
 
 
 
 
 
20
  public function __construct() {
21
 
22
  global $wpdb;
collectors/hooks.php CHANGED
@@ -10,10 +10,6 @@ class QM_Collector_Hooks extends QM_Collector {
10
  public $id = 'hooks';
11
  protected static $hide_core;
12
 
13
- public function name() {
14
- return __( 'Hooks & Actions', 'query-monitor' );
15
- }
16
-
17
  public function process() {
18
 
19
  global $wp_actions, $wp_filter;
10
  public $id = 'hooks';
11
  protected static $hide_core;
12
 
 
 
 
 
13
  public function process() {
14
 
15
  global $wp_actions, $wp_filter;
collectors/http.php CHANGED
@@ -11,10 +11,6 @@ class QM_Collector_HTTP extends QM_Collector {
11
  private $transport = null;
12
  private $info = null;
13
 
14
- public function name() {
15
- return __( 'HTTP API Calls', 'query-monitor' );
16
- }
17
-
18
  public function __construct() {
19
 
20
  parent::__construct();
@@ -248,10 +244,9 @@ class QM_Collector_HTTP extends QM_Collector {
248
  if ( ! in_array( $http['response']->get_error_code(), $silent, true ) ) {
249
  $this->data['errors']['alert'][] = $key;
250
  }
251
- $http['type'] = __( 'Error', 'query-monitor' );
252
  } elseif ( ! $http['args']['blocking'] ) {
253
- /* translators: A non-blocking HTTP API request */
254
- $http['type'] = __( 'Non-blocking', 'query-monitor' );
255
  } else {
256
  $http['type'] = intval( wp_remote_retrieve_response_code( $http['response'] ) );
257
  if ( $http['type'] >= 400 ) {
11
  private $transport = null;
12
  private $info = null;
13
 
 
 
 
 
14
  public function __construct() {
15
 
16
  parent::__construct();
244
  if ( ! in_array( $http['response']->get_error_code(), $silent, true ) ) {
245
  $this->data['errors']['alert'][] = $key;
246
  }
247
+ $http['type'] = -1;
248
  } elseif ( ! $http['args']['blocking'] ) {
249
+ $http['type'] = -2;
 
250
  } else {
251
  $http['type'] = intval( wp_remote_retrieve_response_code( $http['response'] ) );
252
  if ( $http['type'] >= 400 ) {
collectors/languages.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_Languages extends QM_Collector {
9
 
10
  public $id = 'languages';
11
 
12
- public function name() {
13
- return __( 'Languages', 'query-monitor' );
14
- }
15
-
16
  public function __construct() {
17
 
18
  parent::__construct();
@@ -117,11 +113,14 @@ class QM_Collector_Languages extends QM_Collector {
117
  $caller['line'] = $filtered[0]['line'];
118
  }
119
 
 
 
120
  $this->data['languages'][ $domain ][] = array(
121
  'caller' => $caller,
122
  'domain' => $domain,
123
  'file' => $mofile,
124
- 'found' => file_exists( $mofile ) ? filesize( $mofile ) : false,
 
125
  'handle' => null,
126
  'type' => 'gettext',
127
  );
9
 
10
  public $id = 'languages';
11
 
 
 
 
 
12
  public function __construct() {
13
 
14
  parent::__construct();
113
  $caller['line'] = $filtered[0]['line'];
114
  }
115
 
116
+ $found = file_exists( $mofile ) ? filesize( $mofile ) : false;
117
+
118
  $this->data['languages'][ $domain ][] = array(
119
  'caller' => $caller,
120
  'domain' => $domain,
121
  'file' => $mofile,
122
+ 'found' => $found,
123
+ 'found_formatted' => $found ? size_format( $found ) : '',
124
  'handle' => null,
125
  'type' => 'gettext',
126
  );
collectors/logger.php CHANGED
@@ -18,10 +18,6 @@ class QM_Collector_Logger extends QM_Collector {
18
  const INFO = 'info';
19
  const DEBUG = 'debug';
20
 
21
- public function name() {
22
- return __( 'Logger', 'query-monitor' );
23
- }
24
-
25
  public function __construct() {
26
  parent::__construct();
27
  foreach ( $this->get_levels() as $level ) {
18
  const INFO = 'info';
19
  const DEBUG = 'debug';
20
 
 
 
 
 
21
  public function __construct() {
22
  parent::__construct();
23
  foreach ( $this->get_levels() as $level ) {
collectors/overview.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_Overview extends QM_Collector {
9
 
10
  public $id = 'overview';
11
 
12
- public function name() {
13
- return __( 'Overview', 'query-monitor' );
14
- }
15
-
16
  public function process() {
17
 
18
  $this->data['time_taken'] = self::timer_stop_float();
9
 
10
  public $id = 'overview';
11
 
 
 
 
 
12
  public function process() {
13
 
14
  $this->data['time_taken'] = self::timer_stop_float();
collectors/php_errors.php CHANGED
@@ -16,10 +16,6 @@ class QM_Collector_PHP_Errors extends QM_Collector {
16
  private $exception_handler = null;
17
  private static $unexpected_error;
18
 
19
- public function name() {
20
- return __( 'PHP Errors', 'query-monitor' );
21
- }
22
-
23
  public function __construct() {
24
  if ( defined( 'QM_DISABLE_ERROR_HANDLER' ) && QM_DISABLE_ERROR_HANDLER ) {
25
  return;
16
  private $exception_handler = null;
17
  private static $unexpected_error;
18
 
 
 
 
 
19
  public function __construct() {
20
  if ( defined( 'QM_DISABLE_ERROR_HANDLER' ) && QM_DISABLE_ERROR_HANDLER ) {
21
  return;
collectors/raw_request.php CHANGED
@@ -4,17 +4,6 @@ class QM_Collector_Raw_Request extends QM_Collector {
4
 
5
  public $id = 'raw_request';
6
 
7
- /**
8
- * Collector name.
9
- *
10
- * This is unused.
11
- *
12
- * @return string
13
- */
14
- public function name() {
15
- return __( 'Request Data', 'query-monitor' );
16
- }
17
-
18
  /**
19
  * Extracts headers from a PHP-style $_SERVER array.
20
  *
@@ -87,7 +76,7 @@ class QM_Collector_Raw_Request extends QM_Collector {
87
  return http_response_code();
88
  }
89
 
90
- return __( 'Unknown HTTP Response Code', 'query-monitor' );
91
  }
92
  }
93
 
4
 
5
  public $id = 'raw_request';
6
 
 
 
 
 
 
 
 
 
 
 
 
7
  /**
8
  * Extracts headers from a PHP-style $_SERVER array.
9
  *
76
  return http_response_code();
77
  }
78
 
79
+ return null;
80
  }
81
  }
82
 
collectors/redirects.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_Redirects extends QM_Collector {
9
 
10
  public $id = 'redirects';
11
 
12
- public function name() {
13
- return __( 'Redirects', 'query-monitor' );
14
- }
15
-
16
  public function __construct() {
17
  parent::__construct();
18
  add_filter( 'wp_redirect', array( $this, 'filter_wp_redirect' ), 9999, 2 );
9
 
10
  public $id = 'redirects';
11
 
 
 
 
 
12
  public function __construct() {
13
  parent::__construct();
14
  add_filter( 'wp_redirect', array( $this, 'filter_wp_redirect' ), 9999, 2 );
collectors/request.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_Request extends QM_Collector {
9
 
10
  public $id = 'request';
11
 
12
- public function name() {
13
- return __( 'Request', 'query-monitor' );
14
- }
15
-
16
  public function get_concerned_actions() {
17
  return array(
18
  # Rewrites
@@ -45,6 +41,34 @@ class QM_Collector_Request extends QM_Collector {
45
  'search_rewrite_rules',
46
  'tag_rewrite_rules',
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  # More rewrite stuff
49
  'iis7_url_rewrite_rules',
50
  'mod_rewrite_rules',
9
 
10
  public $id = 'request';
11
 
 
 
 
 
12
  public function get_concerned_actions() {
13
  return array(
14
  # Rewrites
41
  'search_rewrite_rules',
42
  'tag_rewrite_rules',
43
 
44
+ # Home URL
45
+ 'home_url',
46
+
47
+ # Post permalinks
48
+ '_get_page_link',
49
+ 'attachment_link',
50
+ 'page_link',
51
+ 'post_link',
52
+ 'post_type_link',
53
+ 'pre_post_link',
54
+ 'preview_post_link',
55
+ 'the_permalink',
56
+
57
+ # Post type archive permalinks
58
+ 'post_type_archive_link',
59
+
60
+ # Term permalinks
61
+ 'category_link',
62
+ 'pre_term_link',
63
+ 'tag_link',
64
+ 'term_link',
65
+
66
+ # User permalinks
67
+ 'author_link',
68
+
69
+ # Comment permalinks
70
+ 'get_comment_link',
71
+
72
  # More rewrite stuff
73
  'iis7_url_rewrite_rules',
74
  'mod_rewrite_rules',
collectors/theme.php CHANGED
@@ -10,10 +10,6 @@ class QM_Collector_Theme extends QM_Collector {
10
  public $id = 'response';
11
  protected $got_theme_compat = false;
12
 
13
- public function name() {
14
- return __( 'Theme', 'query-monitor' );
15
- }
16
-
17
  public function __construct() {
18
  parent::__construct();
19
  add_filter( 'body_class', array( $this, 'filter_body_class' ), 9999 );
10
  public $id = 'response';
11
  protected $got_theme_compat = false;
12
 
 
 
 
 
13
  public function __construct() {
14
  parent::__construct();
15
  add_filter( 'body_class', array( $this, 'filter_body_class' ), 9999 );
collectors/timing.php CHANGED
@@ -12,10 +12,6 @@ class QM_Collector_Timing extends QM_Collector {
12
  private $start = array();
13
  private $stop = array();
14
 
15
- public function name() {
16
- return __( 'Timing', 'query-monitor' );
17
- }
18
-
19
  public function __construct() {
20
  parent::__construct();
21
  add_action( 'qm/start', array( $this, 'action_function_time_start' ), 10, 1 );
12
  private $start = array();
13
  private $stop = array();
14
 
 
 
 
 
15
  public function __construct() {
16
  parent::__construct();
17
  add_action( 'qm/start', array( $this, 'action_function_time_start' ), 10, 1 );
collectors/transients.php CHANGED
@@ -9,10 +9,6 @@ class QM_Collector_Transients extends QM_Collector {
9
 
10
  public $id = 'transients';
11
 
12
- public function name() {
13
- return __( 'Transients', 'query-monitor' );
14
- }
15
-
16
  public function __construct() {
17
  parent::__construct();
18
  add_action( 'setted_site_transient', array( $this, 'action_setted_site_transient' ), 10, 3 );
@@ -37,16 +33,48 @@ class QM_Collector_Transients extends QM_Collector {
37
  $trace = new QM_Backtrace( array(
38
  'ignore_frames' => 1, # Ignore the action_setted_(site|blog)_transient method
39
  ) );
 
 
 
 
 
 
 
 
40
  $this->data['trans'][] = array(
41
- 'transient' => $transient,
42
  'trace' => $trace,
43
  'type' => $type,
44
  'value' => $value,
45
  'expiration' => $expiration,
46
- 'size' => strlen( maybe_serialize( $value ) ),
 
 
47
  );
48
  }
49
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  }
51
 
52
  # Load early in case a plugin is setting transients when it initialises instead of after the `plugins_loaded` hook
9
 
10
  public $id = 'transients';
11
 
 
 
 
 
12
  public function __construct() {
13
  parent::__construct();
14
  add_action( 'setted_site_transient', array( $this, 'action_setted_site_transient' ), 10, 3 );
33
  $trace = new QM_Backtrace( array(
34
  'ignore_frames' => 1, # Ignore the action_setted_(site|blog)_transient method
35
  ) );
36
+
37
+ $name = str_replace( array(
38
+ '_site_transient_',
39
+ '_transient_',
40
+ ), '', $transient );
41
+
42
+ $size = strlen( maybe_serialize( $value ) );
43
+
44
  $this->data['trans'][] = array(
45
+ 'name' => $name,
46
  'trace' => $trace,
47
  'type' => $type,
48
  'value' => $value,
49
  'expiration' => $expiration,
50
+ 'exp_diff' => ( $expiration ? human_time_diff( 0, $expiration ) : '' ),
51
+ 'size' => $size,
52
+ 'size_formatted' => size_format( $size ),
53
  );
54
  }
55
 
56
+ public function process() {
57
+ $this->data['has_type'] = is_multisite();
58
+
59
+ if ( empty( $this->data['trans'] ) ) {
60
+ return;
61
+ }
62
+
63
+ foreach ( $this->data['trans'] as $i => $transient ) {
64
+ $filtered_trace = $transient['trace']->get_display_trace();
65
+
66
+ array_shift( $filtered_trace ); // remove do_action('setted_(site_)?transient')
67
+ array_shift( $filtered_trace ); // remove set_(site_)?transient()
68
+
69
+ $component = $transient['trace']->get_component();
70
+
71
+ $this->data['trans'][ $i ]['filtered_trace'] = $filtered_trace;
72
+ $this->data['trans'][ $i ]['component'] = $component;
73
+
74
+ unset( $this->data['trans'][ $i ]['trace'] );
75
+ }
76
+ }
77
+
78
  }
79
 
80
  # Load early in case a plugin is setting transients when it initialises instead of after the `plugins_loaded` hook
dispatchers/Html.php CHANGED
@@ -25,6 +25,7 @@ class QM_Dispatcher_Html extends QM_Dispatcher {
25
  add_action( 'admin_bar_menu', array( $this, 'action_admin_bar_menu' ), 999 );
26
  add_action( 'wp_ajax_qm_auth_on', array( $this, 'ajax_on' ) );
27
  add_action( 'wp_ajax_qm_auth_off', array( $this, 'ajax_off' ) );
 
28
  add_action( 'wp_ajax_nopriv_qm_auth_off', array( $this, 'ajax_off' ) );
29
 
30
  add_action( 'shutdown', array( $this, 'dispatch' ), 0 );
@@ -82,6 +83,22 @@ class QM_Dispatcher_Html extends QM_Dispatcher {
82
 
83
  }
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  public function action_admin_bar_menu( WP_Admin_Bar $wp_admin_bar ) {
86
 
87
  if ( ! $this->user_can_view() ) {
@@ -90,13 +107,13 @@ class QM_Dispatcher_Html extends QM_Dispatcher {
90
 
91
  $title = __( 'Query Monitor', 'query-monitor' );
92
 
93
- $wp_admin_bar->add_menu( array(
94
  'id' => 'query-monitor',
95
  'title' => esc_html( $title ),
96
  'href' => '#qm-overview',
97
  ) );
98
 
99
- $wp_admin_bar->add_menu( array(
100
  'parent' => 'query-monitor',
101
  'id' => 'query-monitor-placeholder',
102
  'title' => esc_html( $title ),
@@ -176,8 +193,9 @@ class QM_Dispatcher_Html extends QM_Dispatcher {
176
  'ajax_error' => __( 'PHP Errors in Ajax Response', 'query-monitor' ),
177
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
178
  'auth_nonce' => array(
179
- 'on' => wp_create_nonce( 'qm-auth-on' ),
180
- 'off' => wp_create_nonce( 'qm-auth-off' ),
 
181
  ),
182
  )
183
  );
@@ -198,12 +216,12 @@ class QM_Dispatcher_Html extends QM_Dispatcher {
198
  $timer->start();
199
 
200
  printf(
201
- "\n" . '<!-- Begin %s output -->' . "\n",
202
  esc_html( $id )
203
  );
204
  $output->output();
205
  printf(
206
- "\n" . '<!-- End %s output -->' . "\n",
207
  esc_html( $id )
208
  );
209
 
@@ -367,6 +385,7 @@ class QM_Dispatcher_Html extends QM_Dispatcher {
367
  protected function after_output() {
368
 
369
  $state = self::user_verified() ? 'on' : 'off';
 
370
  $text = array(
371
  'on' => __( 'Clear authentication cookie', 'query-monitor' ),
372
  'off' => __( 'Set authentication cookie', 'query-monitor' ),
@@ -381,9 +400,41 @@ class QM_Dispatcher_Html extends QM_Dispatcher {
381
 
382
  echo '<p>' . esc_html__( 'You can set an authentication cookie which allows you to view Query Monitor output when you&rsquo;re not logged in, or when you&rsquo;re logged in as a different user.', 'query-monitor' ) . '</p>';
383
 
 
 
384
  echo '<p data-qm-state-visibility="on"><span class="dashicons dashicons-yes qm-dashicons-yes"></span> ' . esc_html__( 'Authentication cookie is set', 'query-monitor' ) . '</p>';
385
 
386
- echo '<p><button class="qm-auth qm-button" data-qm-text-on="' . esc_attr( $text['on'] ) . '" data-qm-text-off="' . esc_attr( $text['off'] ) . '">' . esc_html( $text[ $state ] ) . '</button></p>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  echo '</section>';
388
  echo '</div>';
389
 
25
  add_action( 'admin_bar_menu', array( $this, 'action_admin_bar_menu' ), 999 );
26
  add_action( 'wp_ajax_qm_auth_on', array( $this, 'ajax_on' ) );
27
  add_action( 'wp_ajax_qm_auth_off', array( $this, 'ajax_off' ) );
28
+ add_action( 'wp_ajax_qm_editor_set', array( $this, 'ajax_editor_set' ) );
29
  add_action( 'wp_ajax_nopriv_qm_auth_off', array( $this, 'ajax_off' ) );
30
 
31
  add_action( 'shutdown', array( $this, 'dispatch' ), 0 );
83
 
84
  }
85
 
86
+ public function ajax_editor_set() {
87
+
88
+ if ( ! current_user_can( 'view_query_monitor' ) || ! check_ajax_referer( 'qm-editor-set', 'nonce', false ) ) {
89
+ wp_send_json_error();
90
+ }
91
+
92
+ $expiration = time() + ( 2 * YEAR_IN_SECONDS );
93
+ $secure = self::secure_cookie();
94
+ $editor = wp_unslash( $_POST['editor'] );
95
+
96
+ setcookie( QM_EDITOR_COOKIE, $editor, $expiration, COOKIEPATH, COOKIE_DOMAIN, $secure, false );
97
+
98
+ wp_send_json_success( $editor );
99
+
100
+ }
101
+
102
  public function action_admin_bar_menu( WP_Admin_Bar $wp_admin_bar ) {
103
 
104
  if ( ! $this->user_can_view() ) {
107
 
108
  $title = __( 'Query Monitor', 'query-monitor' );
109
 
110
+ $wp_admin_bar->add_node( array(
111
  'id' => 'query-monitor',
112
  'title' => esc_html( $title ),
113
  'href' => '#qm-overview',
114
  ) );
115
 
116
+ $wp_admin_bar->add_node( array(
117
  'parent' => 'query-monitor',
118
  'id' => 'query-monitor-placeholder',
119
  'title' => esc_html( $title ),
193
  'ajax_error' => __( 'PHP Errors in Ajax Response', 'query-monitor' ),
194
  'ajaxurl' => admin_url( 'admin-ajax.php' ),
195
  'auth_nonce' => array(
196
+ 'on' => wp_create_nonce( 'qm-auth-on' ),
197
+ 'off' => wp_create_nonce( 'qm-auth-off' ),
198
+ 'editor-set' => wp_create_nonce( 'qm-editor-set' ),
199
  ),
200
  )
201
  );
216
  $timer->start();
217
 
218
  printf(
219
+ "\n" . '<!-- Begin %1$s output -->' . "\n" . '<div class="qm-panel-container" id="qm-%1$s-container">' . "\n",
220
  esc_html( $id )
221
  );
222
  $output->output();
223
  printf(
224
+ "\n" . '</div>' . "\n" . '<!-- End %s output -->' . "\n",
225
  esc_html( $id )
226
  );
227
 
385
  protected function after_output() {
386
 
387
  $state = self::user_verified() ? 'on' : 'off';
388
+ $editor = self::editor_cookie();
389
  $text = array(
390
  'on' => __( 'Clear authentication cookie', 'query-monitor' ),
391
  'off' => __( 'Set authentication cookie', 'query-monitor' ),
400
 
401
  echo '<p>' . esc_html__( 'You can set an authentication cookie which allows you to view Query Monitor output when you&rsquo;re not logged in, or when you&rsquo;re logged in as a different user.', 'query-monitor' ) . '</p>';
402
 
403
+ echo '<p><button class="qm-auth qm-button" data-qm-text-on="' . esc_attr( $text['on'] ) . '" data-qm-text-off="' . esc_attr( $text['off'] ) . '">' . esc_html( $text[ $state ] ) . '</button></p>';
404
+
405
  echo '<p data-qm-state-visibility="on"><span class="dashicons dashicons-yes qm-dashicons-yes"></span> ' . esc_html__( 'Authentication cookie is set', 'query-monitor' ) . '</p>';
406
 
407
+ echo '</section>';
408
+ echo '</div>';
409
+
410
+ echo '<div class="qm-boxed">';
411
+ echo '<section class="qm-editor">';
412
+
413
+ echo '<h3>' . esc_html__( 'Editor', 'query-monitor' ) . '</h3>';
414
+
415
+ echo '<p>' . esc_html__( 'You can set your editor here, so that when you click on stack trace links the file opens in your editor.', 'query-monitor' ) . '</p>';
416
+
417
+ echo '<p>';
418
+ echo '<select id="qm-editor-select" name="qm-editor-select" class="qm-filter">';
419
+
420
+ $editors = array(
421
+ 'Default/Xdebug' => '',
422
+ 'Atom' => 'atom',
423
+ 'Netbeans' => 'netbeans',
424
+ 'PhpStorm' => 'phpstorm',
425
+ 'Sublime Text' => 'sublime',
426
+ 'Visual Studio Code' => 'vscode',
427
+ );
428
+
429
+ foreach ( $editors as $name => $value ) {
430
+ echo '<option value="' . esc_attr( $value ) . '" ' . selected( $value, $editor, false ) . '>' . esc_html( $name ) . '</option>';
431
+ }
432
+
433
+ echo '</select>';
434
+ echo '</p><p>';
435
+ echo '<button class="qm-editor-button qm-button">' . esc_html__( 'Set editor cookie', 'query-monitor' ) . '</button>';
436
+ echo '</p>';
437
+ echo '<p id="qm-editor-save-status"><span class="dashicons dashicons-yes qm-dashicons-yes"></span> ' . esc_html__( 'Saved! Reload to apply changes.', 'query-monitor' ) . '</p>';
438
  echo '</section>';
439
  echo '</div>';
440
 
output/Html.php CHANGED
@@ -12,10 +12,20 @@ abstract class QM_Output_Html extends QM_Output {
12
  protected $current_id = null;
13
  protected $current_name = null;
14
 
 
 
 
 
 
 
 
 
 
 
15
  public function admin_menu( array $menu ) {
16
 
17
  $menu[ $this->collector->id() ] = $this->menu( array(
18
- 'title' => esc_html( $this->collector->name() ),
19
  ) );
20
  return $menu;
21
 
@@ -34,7 +44,7 @@ abstract class QM_Output_Html extends QM_Output {
34
  $id = $this->collector->id();
35
  }
36
  if ( null === $name ) {
37
- $name = $this->collector->name();
38
  }
39
 
40
  $this->current_id = $id;
@@ -66,7 +76,7 @@ abstract class QM_Output_Html extends QM_Output {
66
  $id = $this->collector->id();
67
  }
68
  if ( null === $name ) {
69
- $name = $this->collector->name();
70
  }
71
 
72
  $this->current_id = $id;
@@ -122,7 +132,7 @@ abstract class QM_Output_Html extends QM_Output {
122
  sprintf(
123
  /* translators: %s: Panel name */
124
  esc_html__( '%s: Related Hooks with Filters or Actions Attached', 'query-monitor' ),
125
- esc_html( $this->collector->name() )
126
  )
127
  );
128
 
@@ -156,7 +166,7 @@ abstract class QM_Output_Html extends QM_Output {
156
  $id = $this->collector->id();
157
  }
158
  if ( null === $name ) {
159
- $name = $this->collector->name();
160
  }
161
 
162
  printf(
@@ -273,8 +283,12 @@ abstract class QM_Output_Html extends QM_Output {
273
  }
274
  }
275
 
276
- foreach ( $values as $value ) {
277
- $out .= '<option value="' . esc_attr( $value ) . '">' . esc_html( $value ) . '</option>';
 
 
 
 
278
  }
279
 
280
  if ( ! empty( $args['append'] ) ) {
@@ -378,7 +392,6 @@ abstract class QM_Output_Html extends QM_Output {
378
  * @return string The fully formatted file link or file name, safe for output.
379
  */
380
  public static function output_filename( $text, $file, $line = 0, $is_filename = false ) {
381
-
382
  if ( empty( $file ) ) {
383
  if ( $is_filename ) {
384
  return esc_html( $text );
@@ -428,10 +441,42 @@ abstract class QM_Output_Html extends QM_Output {
428
  );
429
  }
430
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
431
  public static function get_file_link_format() {
432
  if ( ! isset( self::$file_link_format ) ) {
433
  $format = ini_get( 'xdebug.file_link_format' );
434
 
 
 
 
 
 
 
 
435
  /**
436
  * Filters the clickable file link format.
437
  *
12
  protected $current_id = null;
13
  protected $current_name = null;
14
 
15
+ public function name() {
16
+ _deprecated_function(
17
+ esc_html( get_class( $this->collector ) . '::name()' ),
18
+ '3.5',
19
+ esc_html( get_class( $this ) . '::name()' )
20
+ );
21
+
22
+ return $this->collector->name();
23
+ }
24
+
25
  public function admin_menu( array $menu ) {
26
 
27
  $menu[ $this->collector->id() ] = $this->menu( array(
28
+ 'title' => esc_html( $this->name() ),
29
  ) );
30
  return $menu;
31
 
44
  $id = $this->collector->id();
45
  }
46
  if ( null === $name ) {
47
+ $name = $this->name();
48
  }
49
 
50
  $this->current_id = $id;
76
  $id = $this->collector->id();
77
  }
78
  if ( null === $name ) {
79
+ $name = $this->name();
80
  }
81
 
82
  $this->current_id = $id;
132
  sprintf(
133
  /* translators: %s: Panel name */
134
  esc_html__( '%s: Related Hooks with Filters or Actions Attached', 'query-monitor' ),
135
+ esc_html( $this->name() )
136
  )
137
  );
138
 
166
  $id = $this->collector->id();
167
  }
168
  if ( null === $name ) {
169
+ $name = $this->name();
170
  }
171
 
172
  printf(
283
  }
284
  }
285
 
286
+ foreach ( $values as $key => $value ) {
287
+ if ( is_int( $key ) && $key >= 0 ) {
288
+ $out .= '<option value="' . esc_attr( $value ) . '">' . esc_html( $value ) . '</option>';
289
+ } else {
290
+ $out .= '<option value="' . esc_attr( $key ) . '">' . esc_html( $value ) . '</option>';
291
+ }
292
  }
293
 
294
  if ( ! empty( $args['append'] ) ) {
392
  * @return string The fully formatted file link or file name, safe for output.
393
  */
394
  public static function output_filename( $text, $file, $line = 0, $is_filename = false ) {
 
395
  if ( empty( $file ) ) {
396
  if ( $is_filename ) {
397
  return esc_html( $text );
441
  );
442
  }
443
 
444
+ /**
445
+ * Provides a protocol URL for edit links in QM stack traces for various editors.
446
+ *
447
+ * @param string $editor the chosen code editor
448
+ * @param string $default_format a format to use if no editor is found
449
+ *
450
+ * @return string a protocol URL format
451
+ */
452
+ public static function get_editor_file_link_format( $editor, $default_format ) {
453
+ switch ( $editor ) {
454
+ case 'phpstorm':
455
+ return 'phpstorm://open?file=%f&line=%l';
456
+ case 'vscode':
457
+ return 'vscode://file/%f:%l';
458
+ case 'atom':
459
+ return 'atom://open/?url=file://%f&line=%l';
460
+ case 'sublime':
461
+ return 'subl://open/?url=file://%f&line=%l';
462
+ case 'netbeans':
463
+ return 'nbopen://%f:%l';
464
+ default:
465
+ return $default_format;
466
+ }
467
+ }
468
+
469
  public static function get_file_link_format() {
470
  if ( ! isset( self::$file_link_format ) ) {
471
  $format = ini_get( 'xdebug.file_link_format' );
472
 
473
+ if ( isset( $_COOKIE[ QM_EDITOR_COOKIE ] ) ) {
474
+ $format = self::get_editor_file_link_format(
475
+ $_COOKIE[ QM_EDITOR_COOKIE ],
476
+ $format
477
+ );
478
+ }
479
+
480
  /**
481
  * Filters the clickable file link format.
482
  *
output/html/admin.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_Admin extends QM_Output_Html {
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 60 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
 
24
  $data = $this->collector->get_data();
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 60 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Admin Screen', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
output/html/assets.php CHANGED
@@ -88,7 +88,7 @@ abstract class QM_Output_Html_Assets extends QM_Output_Html {
88
  printf(
89
  '<td colspan="7">%1$s</td>',
90
  sprintf(
91
- esc_html( translate_nooped_plural( $type_label['total'], $data['counts']['total'], 'query-monitor' ) ),
92
  '<span class="qm-items-number">' . esc_html( number_format_i18n( $data['counts']['total'] ) ) . '</span>'
93
  )
94
  );
@@ -99,12 +99,31 @@ abstract class QM_Output_Html_Assets extends QM_Output_Html {
99
  }
100
 
101
  protected function dependency_row( $handle, array $asset, $label ) {
 
 
102
  $highlight_deps = array_map( array( $this, '_prefix_type' ), $asset['dependencies'] );
103
  $highlight_dependents = array_map( array( $this, '_prefix_type' ), $asset['dependents'] );
104
 
105
  $dependencies_list = implode( ' ', $asset['dependencies'] );
106
  $dependents_list = implode( ' ', $asset['dependents'] );
107
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  $qm_host = ( $asset['local'] ) ? 'local' : __( 'Other', 'query-monitor' );
109
 
110
  $class = '';
@@ -159,7 +178,12 @@ abstract class QM_Output_Html_Assets extends QM_Output_Html {
159
  );
160
  }
161
  echo '</td>';
162
- echo '<td class="qm-ltr qm-highlighter" data-qm-highlight="' . esc_attr( implode( ' ', $highlight_deps ) ) . '">' . implode( ', ', array_map( 'esc_html', $asset['dependencies'] ) ) . '</td>';
 
 
 
 
 
163
  echo '<td class="qm-ltr qm-highlighter" data-qm-highlight="' . esc_attr( implode( ' ', $highlight_dependents ) ) . '">' . implode( ', ', array_map( 'esc_html', $asset['dependents'] ) ) . '</td>';
164
  echo '<td class="qm-ltr">' . esc_html( $asset['ver'] ) . '</td>';
165
 
@@ -192,7 +216,7 @@ abstract class QM_Output_Html_Assets extends QM_Output_Html {
192
 
193
  $type_label = $this->get_type_labels();
194
  $label = sprintf(
195
- translate_nooped_plural( $type_label['count'], $data['counts']['total'], 'query-monitor' ),
196
  number_format_i18n( $data['counts']['total'] )
197
  );
198
 
88
  printf(
89
  '<td colspan="7">%1$s</td>',
90
  sprintf(
91
+ esc_html( $type_label['total'] ),
92
  '<span class="qm-items-number">' . esc_html( number_format_i18n( $data['counts']['total'] ) ) . '</span>'
93
  )
94
  );
99
  }
100
 
101
  protected function dependency_row( $handle, array $asset, $label ) {
102
+ $data = $this->collector->get_data();
103
+
104
  $highlight_deps = array_map( array( $this, '_prefix_type' ), $asset['dependencies'] );
105
  $highlight_dependents = array_map( array( $this, '_prefix_type' ), $asset['dependents'] );
106
 
107
  $dependencies_list = implode( ' ', $asset['dependencies'] );
108
  $dependents_list = implode( ' ', $asset['dependents'] );
109
 
110
+ $dependency_output = array();
111
+
112
+ foreach ( $asset['dependencies'] as $dep ) {
113
+ if ( isset( $data['missing_dependencies'][ $dep ] ) ) {
114
+ $dependency_output[] = sprintf(
115
+ '<span style="white-space:nowrap"><span class="dashicons dashicons-warning" aria-hidden="true"></span>%s</span>',
116
+ sprintf(
117
+ /* translators: %s: Name of missing script or style dependency */
118
+ __( '%s (missing)', 'query-monitor' ),
119
+ esc_html( $dep )
120
+ )
121
+ );
122
+ } else {
123
+ $dependency_output[] = $dep;
124
+ }
125
+ }
126
+
127
  $qm_host = ( $asset['local'] ) ? 'local' : __( 'Other', 'query-monitor' );
128
 
129
  $class = '';
178
  );
179
  }
180
  echo '</td>';
181
+ echo '<td class="qm-ltr qm-highlighter" data-qm-highlight="' . esc_attr( implode( ' ', $highlight_deps ) ) . '">';
182
+
183
+ // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
184
+ echo implode( ', ', $dependency_output );
185
+
186
+ echo '</td>';
187
  echo '<td class="qm-ltr qm-highlighter" data-qm-highlight="' . esc_attr( implode( ' ', $highlight_dependents ) ) . '">' . implode( ', ', array_map( 'esc_html', $asset['dependents'] ) ) . '</td>';
188
  echo '<td class="qm-ltr">' . esc_html( $asset['ver'] ) . '</td>';
189
 
216
 
217
  $type_label = $this->get_type_labels();
218
  $label = sprintf(
219
+ $type_label['count'],
220
  number_format_i18n( $data['counts']['total'] )
221
  );
222
 
output/html/assets_scripts.php CHANGED
@@ -14,13 +14,17 @@ class QM_Output_Html_Assets_Scripts extends QM_Output_Html_Assets {
14
  */
15
  protected $collector;
16
 
 
 
 
 
17
  public function get_type_labels() {
18
  return array(
19
  /* translators: %s: Total number of enqueued scripts */
20
- 'total' => _nx_noop( 'Total: %s', 'Total: %s', 'Enqueued scripts', 'query-monitor' ),
21
  'plural' => __( 'Scripts', 'query-monitor' ),
22
  /* translators: %s: Total number of enqueued scripts */
23
- 'count' => _nx_noop( 'Scripts (%s)', 'Scripts (%s)', 'Enqueued scripts', 'query-monitor' ),
24
  );
25
  }
26
 
14
  */
15
  protected $collector;
16
 
17
+ public function name() {
18
+ return __( 'Scripts', 'query-monitor' );
19
+ }
20
+
21
  public function get_type_labels() {
22
  return array(
23
  /* translators: %s: Total number of enqueued scripts */
24
+ 'total' => _x( 'Total: %s', 'Enqueued scripts', 'query-monitor' ),
25
  'plural' => __( 'Scripts', 'query-monitor' ),
26
  /* translators: %s: Total number of enqueued scripts */
27
+ 'count' => _x( 'Scripts (%s)', 'Enqueued scripts', 'query-monitor' ),
28
  );
29
  }
30
 
output/html/assets_styles.php CHANGED
@@ -14,13 +14,17 @@ class QM_Output_Html_Assets_Styles extends QM_Output_Html_Assets {
14
  */
15
  protected $collector;
16
 
 
 
 
 
17
  public function get_type_labels() {
18
  return array(
19
  /* translators: %s: Total number of enqueued styles */
20
- 'total' => _nx_noop( 'Total: %s', 'Total: %s', 'Enqueued styles', 'query-monitor' ),
21
  'plural' => __( 'Styles', 'query-monitor' ),
22
  /* translators: %s: Total number of enqueued styles */
23
- 'count' => _nx_noop( 'Styles (%s)', 'Styles (%s)', 'Enqueued styles', 'query-monitor' ),
24
  );
25
  }
26
 
14
  */
15
  protected $collector;
16
 
17
+ public function name() {
18
+ return __( 'Styles', 'query-monitor' );
19
+ }
20
+
21
  public function get_type_labels() {
22
  return array(
23
  /* translators: %s: Total number of enqueued styles */
24
+ 'total' => _x( 'Total: %s', 'Enqueued styles', 'query-monitor' ),
25
  'plural' => __( 'Styles', 'query-monitor' ),
26
  /* translators: %s: Total number of enqueued styles */
27
+ 'count' => _x( 'Styles (%s)', 'Enqueued styles', 'query-monitor' ),
28
  );
29
  }
30
 
output/html/block_editor.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_Block_Editor extends QM_Output_Html {
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 55 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
  $data = $this->collector->get_data();
24
 
@@ -185,8 +189,9 @@ class QM_Output_Html_Block_Editor extends QM_Output_Html {
185
  echo self::output_filename( $block['callback']['name'], $block['callback']['file'], $block['callback']['line'] ); // WPCS: XSS ok.
186
  echo '</td>';
187
  } else {
188
- echo '<td class="qm-nowrap qm-ltr qm-has-toggle' . esc_attr( $class ) . '"><ol class="qm-toggler">';
189
  echo self::build_toggler(); // WPCS: XSS ok;
 
190
  echo '<li>';
191
  echo self::output_filename( $block['callback']['name'], $block['callback']['file'], $block['callback']['line'] ); // WPCS: XSS ok.
192
  echo '</li>';
@@ -223,10 +228,10 @@ class QM_Output_Html_Block_Editor extends QM_Output_Html {
223
  }
224
  }
225
 
226
- $inner_html = trim( $block['innerHTML'] );
227
 
228
  if ( $block['size'] > 300 ) {
229
- echo '<td class="qm-ltr qm-has-toggle qm-row-block-html"><div class="qm-toggler">';
230
  echo self::build_toggler(); // WPCS: XSS ok;
231
  echo '<div class="qm-inverse-toggled"><pre class="qm-pre-wrap"><code>';
232
  echo esc_html( substr( $inner_html, 0, 200 ) ) . '&nbsp;&hellip;';
@@ -234,7 +239,7 @@ class QM_Output_Html_Block_Editor extends QM_Output_Html {
234
  echo '<div class="qm-toggled"><pre class="qm-pre-wrap"><code>';
235
  echo esc_html( $inner_html );
236
  echo '</code></pre></div>';
237
- echo '</div></td>';
238
  } else {
239
  echo '<td class="qm-row-block-html"><pre class="qm-pre-wrap"><code>';
240
  echo esc_html( $inner_html );
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 55 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Blocks', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
  $data = $this->collector->get_data();
28
 
189
  echo self::output_filename( $block['callback']['name'], $block['callback']['file'], $block['callback']['line'] ); // WPCS: XSS ok.
190
  echo '</td>';
191
  } else {
192
+ echo '<td class="qm-nowrap qm-ltr qm-has-toggle' . esc_attr( $class ) . '">';
193
  echo self::build_toggler(); // WPCS: XSS ok;
194
+ echo '<ol>';
195
  echo '<li>';
196
  echo self::output_filename( $block['callback']['name'], $block['callback']['file'], $block['callback']['line'] ); // WPCS: XSS ok.
197
  echo '</li>';
228
  }
229
  }
230
 
231
+ $inner_html = $block['innerHTML'];
232
 
233
  if ( $block['size'] > 300 ) {
234
+ echo '<td class="qm-ltr qm-has-toggle qm-row-block-html">';
235
  echo self::build_toggler(); // WPCS: XSS ok;
236
  echo '<div class="qm-inverse-toggled"><pre class="qm-pre-wrap"><code>';
237
  echo esc_html( substr( $inner_html, 0, 200 ) ) . '&nbsp;&hellip;';
239
  echo '<div class="qm-toggled"><pre class="qm-pre-wrap"><code>';
240
  echo esc_html( $inner_html );
241
  echo '</code></pre></div>';
242
+ echo '</td>';
243
  } else {
244
  echo '<td class="qm-row-block-html"><pre class="qm-pre-wrap"><code>';
245
  echo esc_html( $inner_html );
output/html/caps.php CHANGED
@@ -19,8 +19,14 @@ class QM_Output_Html_Caps extends QM_Output_Html {
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 105 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
- if ( ! defined( 'QM_ENABLE_CAPS_PANEL' ) || ! QM_ENABLE_CAPS_PANEL ) {
 
 
24
  $this->before_non_tabular_output();
25
 
26
  echo '<section>';
@@ -63,15 +69,13 @@ class QM_Output_Html_Caps extends QM_Output_Html {
63
  echo $this->build_filter( 'name', $parts, __( 'Capability Check', 'query-monitor' ) ); // WPCS: XSS ok;
64
  echo '</th>';
65
 
66
- if ( $show_user ) {
67
- $users = $data['users'];
68
 
69
- usort( $users, 'strcasecmp' );
70
 
71
- echo '<th scope="col" class="qm-filterable-column qm-num">';
72
- echo $this->build_filter( 'user', $users, __( 'User', 'query-monitor' ) ); // WPCS: XSS ok;
73
- echo '</th>';
74
- }
75
 
76
  echo '<th scope="col" class="qm-filterable-column">';
77
  echo $this->build_filter( 'result', $results, __( 'Result', 'query-monitor' ) ); // WPCS: XSS ok;
@@ -86,7 +90,7 @@ class QM_Output_Html_Caps extends QM_Output_Html {
86
  echo '<tbody>';
87
 
88
  foreach ( $data['caps'] as $row ) {
89
- $component = $row['trace']->get_component();
90
 
91
  $row_attr = array();
92
  $row_attr['data-qm-name'] = implode( ' ', $row['parts'] );
@@ -126,53 +130,36 @@ class QM_Output_Html_Caps extends QM_Output_Html {
126
  $name
127
  );
128
 
129
- if ( $show_user ) {
130
- printf(
131
- '<td class="qm-num">%s</td>',
132
- esc_html( $row['user'] )
133
- );
134
- }
135
 
136
  $result = ( $row['result'] ) ? '<span class="qm-true">true&nbsp;&#x2713;</span>' : 'false';
137
  printf( // WPCS: XSS ok.
138
- '<td class="qm-ltr qm-nowrap">%s</td>',
139
  $result
140
  );
141
 
142
- $stack = array();
143
- $trace = $row['trace']->get_trace();
144
- $filtered_trace = $row['trace']->get_display_trace();
145
 
146
- $last = end( $filtered_trace );
147
- if ( isset( $last['function'] ) && 'map_meta_cap' === $last['function'] ) {
148
- array_shift( $filtered_trace ); // remove the map_meta_cap() call
149
  }
150
 
151
- array_shift( $filtered_trace ); // remove the WP_User->has_cap() call
152
- array_shift( $filtered_trace ); // remove the *_user_can() call
153
-
154
- if ( ! count( $filtered_trace ) ) {
155
- $responsible_name = QM_Util::standard_dir( $trace[1]['file'], '' ) . ':' . $trace[1]['line'];
156
 
157
- $responsible_item = $trace[1];
158
- $responsible_item['display'] = $responsible_name;
159
- $responsible_item['calling_file'] = $trace[1]['file'];
160
- $responsible_item['calling_line'] = $trace[1]['line'];
161
- array_unshift( $filtered_trace, $responsible_item );
162
- }
163
 
164
- foreach ( $filtered_trace as $item ) {
165
- $stack[] = self::output_filename( $item['display'], $item['calling_file'], $item['calling_line'] );
166
  }
167
 
168
- echo '<td class="qm-has-toggle qm-nowrap qm-ltr"><ol class="qm-toggler qm-numbered">';
169
-
170
- $caller = array_shift( $stack );
171
 
172
  echo "<li>{$caller}</li>"; // WPCS: XSS ok.
173
 
174
  if ( ! empty( $stack ) ) {
175
- echo self::build_toggler(); // WPCS: XSS ok;
176
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
177
  }
178
 
@@ -191,11 +178,10 @@ class QM_Output_Html_Caps extends QM_Output_Html {
191
 
192
  echo '<tfoot>';
193
 
194
- $colspan = ( $show_user ) ? 5 : 4;
195
- $count = count( $data['caps'] );
196
 
197
  echo '<tr>';
198
- echo '<td colspan="' . intval( $colspan ) . '">';
199
  printf(
200
  /* translators: %s: Number of user capability checks */
201
  esc_html( _nx( 'Total: %s', 'Total: %s', $count, 'User capability checks', 'query-monitor' ) ),
@@ -218,7 +204,7 @@ class QM_Output_Html_Caps extends QM_Output_Html {
218
 
219
  public function admin_menu( array $menu ) {
220
  $menu[ $this->collector->id() ] = $this->menu( array(
221
- 'title' => $this->collector->name(),
222
  ) );
223
  return $menu;
224
 
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 105 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Capability Checks', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
+ $collector = $this->collector;
28
+
29
+ if ( ! $collector::enabled() ) {
30
  $this->before_non_tabular_output();
31
 
32
  echo '<section>';
69
  echo $this->build_filter( 'name', $parts, __( 'Capability Check', 'query-monitor' ) ); // WPCS: XSS ok;
70
  echo '</th>';
71
 
72
+ $users = $data['users'];
 
73
 
74
+ usort( $users, 'strcasecmp' );
75
 
76
+ echo '<th scope="col" class="qm-filterable-column qm-num">';
77
+ echo $this->build_filter( 'user', $users, __( 'User', 'query-monitor' ) ); // WPCS: XSS ok;
78
+ echo '</th>';
 
79
 
80
  echo '<th scope="col" class="qm-filterable-column">';
81
  echo $this->build_filter( 'result', $results, __( 'Result', 'query-monitor' ) ); // WPCS: XSS ok;
90
  echo '<tbody>';
91
 
92
  foreach ( $data['caps'] as $row ) {
93
+ $component = $row['component'];
94
 
95
  $row_attr = array();
96
  $row_attr['data-qm-name'] = implode( ' ', $row['parts'] );
130
  $name
131
  );
132
 
133
+ printf(
134
+ '<td class="qm-num">%s</td>',
135
+ esc_html( $row['user'] )
136
+ );
 
 
137
 
138
  $result = ( $row['result'] ) ? '<span class="qm-true">true&nbsp;&#x2713;</span>' : 'false';
139
  printf( // WPCS: XSS ok.
140
+ '<td class="qm-nowrap">%s</td>',
141
  $result
142
  );
143
 
144
+ $stack = array();
 
 
145
 
146
+ foreach ( $row['filtered_trace'] as $item ) {
147
+ $stack[] = self::output_filename( $item['display'], $item['calling_file'], $item['calling_line'] );
 
148
  }
149
 
150
+ $caller = array_shift( $stack );
 
 
 
 
151
 
152
+ echo '<td class="qm-has-toggle qm-nowrap qm-ltr">';
 
 
 
 
 
153
 
154
+ if ( ! empty( $stack ) ) {
155
+ echo self::build_toggler(); // WPCS: XSS ok;
156
  }
157
 
158
+ echo '<ol>';
 
 
159
 
160
  echo "<li>{$caller}</li>"; // WPCS: XSS ok.
161
 
162
  if ( ! empty( $stack ) ) {
 
163
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
164
  }
165
 
178
 
179
  echo '<tfoot>';
180
 
181
+ $count = count( $data['caps'] );
 
182
 
183
  echo '<tr>';
184
+ echo '<td colspan="5">';
185
  printf(
186
  /* translators: %s: Number of user capability checks */
187
  esc_html( _nx( 'Total: %s', 'Total: %s', $count, 'User capability checks', 'query-monitor' ) ),
204
 
205
  public function admin_menu( array $menu ) {
206
  $menu[ $this->collector->id() ] = $this->menu( array(
207
+ 'title' => $this->name(),
208
  ) );
209
  return $menu;
210
 
output/html/conditionals.php CHANGED
@@ -20,6 +20,10 @@ class QM_Output_Html_Conditionals extends QM_Output_Html {
20
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 1000 );
21
  }
22
 
 
 
 
 
23
  public function output() {
24
  $data = $this->collector->get_data();
25
 
20
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 1000 );
21
  }
22
 
23
+ public function name() {
24
+ return __( 'Conditionals', 'query-monitor' );
25
+ }
26
+
27
  public function output() {
28
  $data = $this->collector->get_data();
29
 
output/html/db_callers.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_DB_Callers extends QM_Output_Html {
19
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 30 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
 
24
  $data = $this->collector->get_data();
19
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 30 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Queries by Caller', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
output/html/db_components.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_DB_Components extends QM_Output_Html {
19
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 40 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
 
24
  $data = $this->collector->get_data();
19
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 40 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Queries by Component', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
output/html/db_dupes.php CHANGED
@@ -20,6 +20,10 @@ class QM_Output_Html_DB_Dupes extends QM_Output_Html {
20
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 25 );
21
  }
22
 
 
 
 
 
23
  public function output() {
24
 
25
  $data = $this->collector->get_data();
@@ -122,7 +126,7 @@ class QM_Output_Html_DB_Dupes extends QM_Output_Html {
122
  $menu[ $this->collector->id() ] = $this->menu( array(
123
  'title' => esc_html( sprintf(
124
  /* translators: %s: Number of duplicate database queries */
125
- _n( 'Duplicate Queries (%s)', 'Duplicate Queries (%s)', $count, 'query-monitor' ),
126
  number_format_i18n( $count )
127
  ) ),
128
  ) );
20
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 25 );
21
  }
22
 
23
+ public function name() {
24
+ return __( 'Duplicate Queries', 'query-monitor' );
25
+ }
26
+
27
  public function output() {
28
 
29
  $data = $this->collector->get_data();
126
  $menu[ $this->collector->id() ] = $this->menu( array(
127
  'title' => esc_html( sprintf(
128
  /* translators: %s: Number of duplicate database queries */
129
+ __( 'Duplicate Queries (%s)', 'query-monitor' ),
130
  number_format_i18n( $count )
131
  ) ),
132
  ) );
output/html/db_queries.php CHANGED
@@ -24,6 +24,10 @@ class QM_Output_Html_DB_Queries extends QM_Output_Html {
24
  add_filter( 'qm/output/menu_class', array( $this, 'admin_class' ) );
25
  }
26
 
 
 
 
 
27
  public function output() {
28
 
29
  $data = $this->collector->get_data();
@@ -320,7 +324,12 @@ class QM_Output_Html_DB_Queries extends QM_Output_Html {
320
  }
321
  } else {
322
 
323
- $caller_name = '<code>' . esc_html( $row['caller'] ) . '</code>';
 
 
 
 
 
324
  $stack = explode( ', ', $row['stack'] );
325
  $stack = array_reverse( $stack );
326
  array_shift( $stack );
@@ -348,7 +357,7 @@ class QM_Output_Html_DB_Queries extends QM_Output_Html {
348
  $row_attr['data-qm-component'] .= ' non-core';
349
  }
350
  }
351
- if ( isset( $cols['caller'] ) ) {
352
  $row_attr['data-qm-caller'] = $row['caller_name'];
353
 
354
  if ( $row['is_main_query'] ) {
@@ -379,10 +388,14 @@ class QM_Output_Html_DB_Queries extends QM_Output_Html {
379
  }
380
 
381
  if ( isset( $cols['caller'] ) ) {
382
- echo '<td class="qm-row-caller qm-ltr qm-has-toggle qm-nowrap"><ol class="qm-toggler qm-numbered">';
383
- echo "<li>{$caller_name}</li>"; // WPCS: XSS ok.
384
 
385
- echo self::build_toggler(); // WPCS: XSS ok;
 
 
 
 
 
386
 
387
  if ( ! empty( $stack ) ) {
388
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
@@ -399,7 +412,7 @@ class QM_Output_Html_DB_Queries extends QM_Output_Html {
399
  }
400
 
401
  if ( isset( $cols['stack'] ) ) {
402
- echo '<td class="qm-row-caller qm-row-stack qm-nowrap qm-ltr"><ol class="qm-numbered">';
403
  if ( ! empty( $stack ) ) {
404
  echo '<li>' . implode( '</li><li>', $stack ) . '</li>'; // WPCS: XSS ok.
405
  }
@@ -526,7 +539,7 @@ class QM_Output_Html_DB_Queries extends QM_Output_Html {
526
  'href' => '#qm-query-errors',
527
  'title' => esc_html( sprintf(
528
  /* translators: %s: Number of database errors */
529
- _n( 'Database Errors (%s)', 'Database Errors (%s)', $count, 'query-monitor' ),
530
  number_format_i18n( $count )
531
  ) ),
532
  ) );
@@ -540,7 +553,7 @@ class QM_Output_Html_DB_Queries extends QM_Output_Html {
540
  'href' => '#qm-query-expensive',
541
  'title' => esc_html( sprintf(
542
  /* translators: %s: Number of slow database queries */
543
- _n( 'Slow Queries (%s)', 'Slow Queries (%s)', $count, 'query-monitor' ),
544
  number_format_i18n( $count )
545
  ) ),
546
  ) );
24
  add_filter( 'qm/output/menu_class', array( $this, 'admin_class' ) );
25
  }
26
 
27
+ public function name() {
28
+ return __( 'Database Queries', 'query-monitor' );
29
+ }
30
+
31
  public function output() {
32
 
33
  $data = $this->collector->get_data();
324
  }
325
  } else {
326
 
327
+ if ( ! empty( $row['caller'] ) ) {
328
+ $caller_name = '<code>' . esc_html( $row['caller'] ) . '</code>';
329
+ } else {
330
+ $caller_name = '<code>' . esc_html__( 'Unknown', 'query-monitor' ) . '</code>';
331
+ }
332
+
333
  $stack = explode( ', ', $row['stack'] );
334
  $stack = array_reverse( $stack );
335
  array_shift( $stack );
357
  $row_attr['data-qm-component'] .= ' non-core';
358
  }
359
  }
360
+ if ( isset( $cols['caller'] ) && ! empty( $row['caller_name'] ) ) {
361
  $row_attr['data-qm-caller'] = $row['caller_name'];
362
 
363
  if ( $row['is_main_query'] ) {
388
  }
389
 
390
  if ( isset( $cols['caller'] ) ) {
391
+ echo '<td class="qm-row-caller qm-ltr qm-has-toggle qm-nowrap">';
 
392
 
393
+ if ( ! empty( $stack ) ) {
394
+ echo self::build_toggler(); // WPCS: XSS ok;
395
+ }
396
+
397
+ echo '<ol>';
398
+ echo "<li>{$caller_name}</li>"; // WPCS: XSS ok.
399
 
400
  if ( ! empty( $stack ) ) {
401
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
412
  }
413
 
414
  if ( isset( $cols['stack'] ) ) {
415
+ echo '<td class="qm-row-caller qm-row-stack qm-nowrap qm-ltr"><ol>';
416
  if ( ! empty( $stack ) ) {
417
  echo '<li>' . implode( '</li><li>', $stack ) . '</li>'; // WPCS: XSS ok.
418
  }
539
  'href' => '#qm-query-errors',
540
  'title' => esc_html( sprintf(
541
  /* translators: %s: Number of database errors */
542
+ __( 'Database Errors (%s)', 'query-monitor' ),
543
  number_format_i18n( $count )
544
  ) ),
545
  ) );
553
  'href' => '#qm-query-expensive',
554
  'title' => esc_html( sprintf(
555
  /* translators: %s: Number of slow database queries */
556
+ __( 'Slow Queries (%s)', 'query-monitor' ),
557
  number_format_i18n( $count )
558
  ) ),
559
  ) );
output/html/debug_bar.php CHANGED
@@ -19,6 +19,16 @@ class QM_Output_Html_Debug_Bar extends QM_Output_Html {
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 200 );
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
22
  public function output() {
23
  $target = sanitize_html_class( get_class( $this->collector->get_panel() ) );
24
 
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 200 );
20
  }
21
 
22
+ public function name() {
23
+ $title = $this->collector->get_panel()->title();
24
+
25
+ return sprintf(
26
+ /* translators: Debug Bar add-on name */
27
+ __( 'Debug Bar: %s', 'query-monitor' ),
28
+ $title
29
+ );
30
+ }
31
+
32
  public function output() {
33
  $target = sanitize_html_class( get_class( $this->collector->get_panel() ) );
34
 
output/html/environment.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_Environment extends QM_Output_Html {
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 110 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
 
24
  $data = $this->collector->get_data();
@@ -121,7 +125,7 @@ class QM_Output_Html_Environment extends QM_Output_Html {
121
 
122
  echo '<tr>';
123
  echo '<th scope="row">' . esc_html__( 'Error Reporting', 'query-monitor' ) . '</th>';
124
- echo '<td class="qm-has-toggle qm-ltr"><div class="qm-toggler">';
125
 
126
  echo esc_html( $data['php']['error_reporting'] );
127
  echo self::build_toggler(); // WPCS: XSS ok;
@@ -130,13 +134,13 @@ class QM_Output_Html_Environment extends QM_Output_Html {
130
  echo "<ul class='qm-supplemental'><li>{$error_levels}</li></ul>"; // WPCS: XSS ok.
131
  echo '</div>';
132
 
133
- echo '</div></td>';
134
  echo '</tr>';
135
 
136
  if ( ! empty( $data['php']['extensions'] ) ) {
137
  echo '<tr>';
138
  echo '<th scope="row">' . esc_html__( 'Extensions', 'query-monitor' ) . '</th>';
139
- echo '<td class="qm-has-inner qm-has-toggle qm-ltr"><div class="qm-toggler">';
140
 
141
  printf( // WPCS: XSS ok.
142
  '<div class="qm-inner-toggle">%1$s %2$s</div>',
@@ -148,7 +152,7 @@ class QM_Output_Html_Environment extends QM_Output_Html {
148
  self::output_inner( $data['php']['extensions'] );
149
  echo '</div>';
150
 
151
- echo '</div></td>';
152
  echo '</tr>';
153
  }
154
 
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 110 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Environment', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
125
 
126
  echo '<tr>';
127
  echo '<th scope="row">' . esc_html__( 'Error Reporting', 'query-monitor' ) . '</th>';
128
+ echo '<td class="qm-has-toggle qm-ltr">';
129
 
130
  echo esc_html( $data['php']['error_reporting'] );
131
  echo self::build_toggler(); // WPCS: XSS ok;
134
  echo "<ul class='qm-supplemental'><li>{$error_levels}</li></ul>"; // WPCS: XSS ok.
135
  echo '</div>';
136
 
137
+ echo '</td>';
138
  echo '</tr>';
139
 
140
  if ( ! empty( $data['php']['extensions'] ) ) {
141
  echo '<tr>';
142
  echo '<th scope="row">' . esc_html__( 'Extensions', 'query-monitor' ) . '</th>';
143
+ echo '<td class="qm-has-inner qm-has-toggle qm-ltr">';
144
 
145
  printf( // WPCS: XSS ok.
146
  '<div class="qm-inner-toggle">%1$s %2$s</div>',
152
  self::output_inner( $data['php']['extensions'] );
153
  echo '</div>';
154
 
155
+ echo '</td>';
156
  echo '</tr>';
157
  }
158
 
output/html/headers.php CHANGED
@@ -19,6 +19,17 @@ class QM_Output_Html_Headers extends QM_Output_Html {
19
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 20 );
20
  }
21
 
 
 
 
 
 
 
 
 
 
 
 
22
  public function output() {
23
  $this->output_request();
24
  $this->output_response();
19
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 20 );
20
  }
21
 
22
+ /**
23
+ * Collector name.
24
+ *
25
+ * This is unused.
26
+ *
27
+ * @return string
28
+ */
29
+ public function name() {
30
+ return __( 'Request Data', 'query-monitor' );
31
+ }
32
+
33
  public function output() {
34
  $this->output_request();
35
  $this->output_response();
output/html/hooks.php CHANGED
@@ -14,13 +14,15 @@ class QM_Output_Html_Hooks extends QM_Output_Html {
14
  */
15
  protected $collector;
16
 
17
- public $id = 'hooks';
18
-
19
  public function __construct( QM_Collector $collector ) {
20
  parent::__construct( $collector );
21
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 80 );
22
  }
23
 
 
 
 
 
24
  public function output() {
25
 
26
  $data = $this->collector->get_data();
@@ -144,8 +146,9 @@ class QM_Output_Html_Hooks extends QM_Output_Html {
144
  echo self::output_filename( $action['callback']['name'], $action['callback']['file'], $action['callback']['line'] ); // WPCS: XSS ok.
145
  echo '</td>';
146
  } else {
147
- echo '<td class="qm-nowrap qm-ltr qm-has-toggle' . esc_attr( $class ) . '"><ol class="qm-toggler">';
148
  echo self::build_toggler(); // WPCS: XSS ok;
 
149
  echo '<li>';
150
  echo self::output_filename( $action['callback']['name'], $action['callback']['file'], $action['callback']['line'] ); // WPCS: XSS ok.
151
  echo '</li>';
14
  */
15
  protected $collector;
16
 
 
 
17
  public function __construct( QM_Collector $collector ) {
18
  parent::__construct( $collector );
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 80 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Hooks & Actions', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
146
  echo self::output_filename( $action['callback']['name'], $action['callback']['file'], $action['callback']['line'] ); // WPCS: XSS ok.
147
  echo '</td>';
148
  } else {
149
+ echo '<td class="qm-nowrap qm-ltr qm-has-toggle' . esc_attr( $class ) . '">';
150
  echo self::build_toggler(); // WPCS: XSS ok;
151
+ echo '<ol>';
152
  echo '<li>';
153
  echo self::output_filename( $action['callback']['name'], $action['callback']['file'], $action['callback']['line'] ); // WPCS: XSS ok.
154
  echo '</li>';
output/html/http.php CHANGED
@@ -20,12 +20,14 @@ class QM_Output_Html_HTTP extends QM_Output_Html {
20
  add_filter( 'qm/output/menu_class', array( $this, 'admin_class' ) );
21
  }
22
 
 
 
 
 
23
  public function output() {
24
 
25
  $data = $this->collector->get_data();
26
 
27
- $total_time = 0;
28
-
29
  if ( ! empty( $data['http'] ) ) {
30
  $statuses = array_keys( $data['types'] );
31
  $components = wp_list_pluck( $data['component_times'], 'component' );
@@ -33,6 +35,19 @@ class QM_Output_Html_HTTP extends QM_Output_Html {
33
  usort( $statuses, 'strcasecmp' );
34
  usort( $components, 'strcasecmp' );
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  $this->before_tabular_output();
37
 
38
  echo '<thead>';
@@ -40,7 +55,7 @@ class QM_Output_Html_HTTP extends QM_Output_Html {
40
  echo '<th scope="col">' . esc_html__( 'Method', 'query-monitor' ) . '</th>';
41
  echo '<th scope="col">' . esc_html__( 'URL', 'query-monitor' ) . '</th>';
42
  echo '<th scope="col" class="qm-filterable-column">';
43
- echo $this->build_filter( 'type', $statuses, __( 'Status', 'query-monitor' ) ); // WPCS: XSS ok.
44
  echo '</th>';
45
  echo '<th scope="col">' . esc_html__( 'Caller', 'query-monitor' ) . '</th>';
46
  echo '<th scope="col" class="qm-filterable-column">';
@@ -178,7 +193,7 @@ class QM_Output_Html_HTTP extends QM_Output_Html {
178
 
179
  $show_toggle = ( ! empty( $row['transport'] ) && ! empty( $row['info'] ) );
180
 
181
- echo '<td class="qm-has-toggle qm-col-status"><div class="qm-toggler">';
182
  if ( $is_error ) {
183
  echo '<span class="dashicons dashicons-warning" aria-hidden="true"></span>';
184
  }
@@ -254,14 +269,19 @@ class QM_Output_Html_HTTP extends QM_Output_Html {
254
 
255
  echo '</td>';
256
 
257
- echo '<td class="qm-has-toggle qm-nowrap qm-ltr"><ol class="qm-toggler qm-numbered">';
258
-
259
  $caller = array_shift( $stack );
260
 
261
- echo "<li>{$caller}</li>"; // WPCS: XSS ok.
262
 
263
  if ( ! empty( $stack ) ) {
264
  echo self::build_toggler(); // WPCS: XSS ok;
 
 
 
 
 
 
 
265
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
266
  }
267
 
@@ -343,7 +363,7 @@ class QM_Output_Html_HTTP extends QM_Output_Html {
343
  $title = ( empty( $count ) )
344
  ? __( 'HTTP API Calls', 'query-monitor' )
345
  /* translators: %s: Number of calls to the HTTP API */
346
- : _n( 'HTTP API Calls (%s)', 'HTTP API Calls (%s)', $count, 'query-monitor' );
347
 
348
  $args = array(
349
  'title' => esc_html( sprintf(
20
  add_filter( 'qm/output/menu_class', array( $this, 'admin_class' ) );
21
  }
22
 
23
+ public function name() {
24
+ return __( 'HTTP API Calls', 'query-monitor' );
25
+ }
26
+
27
  public function output() {
28
 
29
  $data = $this->collector->get_data();
30
 
 
 
31
  if ( ! empty( $data['http'] ) ) {
32
  $statuses = array_keys( $data['types'] );
33
  $components = wp_list_pluck( $data['component_times'], 'component' );
35
  usort( $statuses, 'strcasecmp' );
36
  usort( $components, 'strcasecmp' );
37
 
38
+ $status_output = array();
39
+
40
+ foreach ( $statuses as $key => $status ) {
41
+ if ( -1 === $status ) {
42
+ $status_output[-1] = __( 'Error', 'query-monitor' );
43
+ } elseif ( -2 === $status ) {
44
+ /* translators: A non-blocking HTTP API request */
45
+ $status_output[-2] = __( 'Non-blocking', 'query-monitor' );
46
+ } else {
47
+ $status_output[] = $status;
48
+ }
49
+ }
50
+
51
  $this->before_tabular_output();
52
 
53
  echo '<thead>';
55
  echo '<th scope="col">' . esc_html__( 'Method', 'query-monitor' ) . '</th>';
56
  echo '<th scope="col">' . esc_html__( 'URL', 'query-monitor' ) . '</th>';
57
  echo '<th scope="col" class="qm-filterable-column">';
58
+ echo $this->build_filter( 'type', $status_output, __( 'Status', 'query-monitor' ) ); // WPCS: XSS ok.
59
  echo '</th>';
60
  echo '<th scope="col">' . esc_html__( 'Caller', 'query-monitor' ) . '</th>';
61
  echo '<th scope="col" class="qm-filterable-column">';
193
 
194
  $show_toggle = ( ! empty( $row['transport'] ) && ! empty( $row['info'] ) );
195
 
196
+ echo '<td class="qm-has-toggle qm-col-status">';
197
  if ( $is_error ) {
198
  echo '<span class="dashicons dashicons-warning" aria-hidden="true"></span>';
199
  }
269
 
270
  echo '</td>';
271
 
 
 
272
  $caller = array_shift( $stack );
273
 
274
+ echo '<td class="qm-has-toggle qm-nowrap qm-ltr">';
275
 
276
  if ( ! empty( $stack ) ) {
277
  echo self::build_toggler(); // WPCS: XSS ok;
278
+ }
279
+
280
+ echo '<ol>';
281
+
282
+ echo "<li>{$caller}</li>"; // WPCS: XSS ok.
283
+
284
+ if ( ! empty( $stack ) ) {
285
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
286
  }
287
 
363
  $title = ( empty( $count ) )
364
  ? __( 'HTTP API Calls', 'query-monitor' )
365
  /* translators: %s: Number of calls to the HTTP API */
366
+ : __( 'HTTP API Calls (%s)', 'query-monitor' );
367
 
368
  $args = array(
369
  'title' => esc_html( sprintf(
output/html/languages.php CHANGED
@@ -14,13 +14,15 @@ class QM_Output_Html_Languages extends QM_Output_Html {
14
  */
15
  protected $collector;
16
 
17
- public $id = 'languages';
18
-
19
  public function __construct( QM_Collector $collector ) {
20
  parent::__construct( $collector );
21
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 80 );
22
  }
23
 
 
 
 
 
24
  public function output() {
25
 
26
  $data = $this->collector->get_data();
@@ -60,8 +62,9 @@ class QM_Output_Html_Languages extends QM_Output_Html {
60
  echo self::output_filename( $mofile['caller']['display'], $mofile['caller']['file'], $mofile['caller']['line'] ); // WPCS: XSS ok.
61
  echo '</td>';
62
  } else {
63
- echo '<td class="qm-nowrap qm-ltr qm-has-toggle"><ol class="qm-toggler">';
64
  echo self::build_toggler(); // WPCS: XSS ok;
 
65
  echo '<li>';
66
  echo self::output_filename( $mofile['caller']['display'], $mofile['caller']['file'], $mofile['caller']['line'] ); // WPCS: XSS ok.
67
  echo '</li>';
@@ -79,7 +82,7 @@ class QM_Output_Html_Languages extends QM_Output_Html {
79
  echo '<td class="qm-nowrap">';
80
 
81
  if ( $mofile['found'] ) {
82
- echo esc_html( size_format( $mofile['found'] ) );
83
  } else {
84
  echo esc_html__( 'Not Found', 'query-monitor' );
85
  }
@@ -87,7 +90,6 @@ class QM_Output_Html_Languages extends QM_Output_Html {
87
  echo '</td>';
88
 
89
  echo '</tr>';
90
- $first = false;
91
  }
92
  }
93
 
@@ -100,7 +102,7 @@ class QM_Output_Html_Languages extends QM_Output_Html {
100
 
101
  $data = $this->collector->get_data();
102
  $args = array(
103
- 'title' => esc_html( $this->collector->name() ),
104
  );
105
 
106
  $menu[ $this->collector->id() ] = $this->menu( $args );
14
  */
15
  protected $collector;
16
 
 
 
17
  public function __construct( QM_Collector $collector ) {
18
  parent::__construct( $collector );
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 80 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Languages', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
62
  echo self::output_filename( $mofile['caller']['display'], $mofile['caller']['file'], $mofile['caller']['line'] ); // WPCS: XSS ok.
63
  echo '</td>';
64
  } else {
65
+ echo '<td class="qm-nowrap qm-ltr qm-has-toggle">';
66
  echo self::build_toggler(); // WPCS: XSS ok;
67
+ echo '<ol>';
68
  echo '<li>';
69
  echo self::output_filename( $mofile['caller']['display'], $mofile['caller']['file'], $mofile['caller']['line'] ); // WPCS: XSS ok.
70
  echo '</li>';
82
  echo '<td class="qm-nowrap">';
83
 
84
  if ( $mofile['found'] ) {
85
+ echo esc_html( $mofile['found_formatted'] );
86
  } else {
87
  echo esc_html__( 'Not Found', 'query-monitor' );
88
  }
90
  echo '</td>';
91
 
92
  echo '</tr>';
 
93
  }
94
  }
95
 
102
 
103
  $data = $this->collector->get_data();
104
  $args = array(
105
+ 'title' => esc_html( $this->name() ),
106
  );
107
 
108
  $menu[ $this->collector->id() ] = $this->menu( $args );
output/html/logger.php CHANGED
@@ -20,6 +20,10 @@ class QM_Output_Html_Logger extends QM_Output_Html {
20
  add_filter( 'qm/output/menu_class', array( $this, 'admin_class' ) );
21
  }
22
 
 
 
 
 
23
  public function output() {
24
 
25
  $data = $this->collector->get_data();
@@ -82,7 +86,7 @@ class QM_Output_Html_Logger extends QM_Output_Html {
82
  echo '</td>';
83
 
84
  printf(
85
- '<td><pre>%s</pre></td>',
86
  esc_html( $row['message'] )
87
  );
88
 
@@ -93,14 +97,19 @@ class QM_Output_Html_Logger extends QM_Output_Html {
93
  $stack[] = self::output_filename( $item['display'], $item['calling_file'], $item['calling_line'] );
94
  }
95
 
96
- echo '<td class="qm-has-toggle qm-nowrap qm-ltr"><ol class="qm-toggler qm-numbered">';
97
-
98
  $caller = array_shift( $stack );
99
 
100
- echo "<li>{$caller}</li>"; // WPCS: XSS ok.
101
 
102
  if ( ! empty( $stack ) ) {
103
  echo self::build_toggler(); // WPCS: XSS ok;
 
 
 
 
 
 
 
104
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
105
  }
106
 
@@ -153,9 +162,17 @@ class QM_Output_Html_Logger extends QM_Output_Html {
153
  }
154
  }
155
 
 
 
 
 
 
156
  $menu[ $this->collector->id() ] = $this->menu( array(
157
  'id' => "query-monitor-logger-{$key}",
158
- 'title' => esc_html__( 'Logs', 'query-monitor' ),
 
 
 
159
  ) );
160
 
161
  return $menu;
20
  add_filter( 'qm/output/menu_class', array( $this, 'admin_class' ) );
21
  }
22
 
23
+ public function name() {
24
+ return __( 'Logger', 'query-monitor' );
25
+ }
26
+
27
  public function output() {
28
 
29
  $data = $this->collector->get_data();
86
  echo '</td>';
87
 
88
  printf(
89
+ '<td>%s</td>',
90
  esc_html( $row['message'] )
91
  );
92
 
97
  $stack[] = self::output_filename( $item['display'], $item['calling_file'], $item['calling_line'] );
98
  }
99
 
 
 
100
  $caller = array_shift( $stack );
101
 
102
+ echo '<td class="qm-has-toggle qm-nowrap qm-ltr">';
103
 
104
  if ( ! empty( $stack ) ) {
105
  echo self::build_toggler(); // WPCS: XSS ok;
106
+ }
107
+
108
+ echo '<ol>';
109
+
110
+ echo "<li>{$caller}</li>"; // WPCS: XSS ok.
111
+
112
+ if ( ! empty( $stack ) ) {
113
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
114
  }
115
 
162
  }
163
  }
164
 
165
+ $count = count( $data['logs'] );
166
+
167
+ /* translators: %s: Number of logs that are available */
168
+ $label = __( 'Logs (%s)', 'query-monitor' );
169
+
170
  $menu[ $this->collector->id() ] = $this->menu( array(
171
  'id' => "query-monitor-logger-{$key}",
172
+ 'title' => esc_html( sprintf(
173
+ $label,
174
+ number_format_i18n( $count )
175
+ ) ),
176
  ) );
177
 
178
  return $menu;
output/html/overview.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_Overview extends QM_Output_Html {
19
  add_filter( 'qm/output/title', array( $this, 'admin_title' ), 10 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
  $data = $this->collector->get_data();
24
 
@@ -53,11 +57,18 @@ class QM_Output_Html_Overview extends QM_Output_Html {
53
  if ( $raw_request ) {
54
  echo '<section id="qm-overview-raw-request">';
55
  $raw_data = $raw_request->get_data();
 
 
 
 
 
 
 
56
  printf(
57
- '<h2>%1$s %2$s → %3$s</h2>',
58
  esc_html( $raw_data['request']['method'] ),
59
  esc_html( $raw_data['request']['url'] ),
60
- esc_html( $raw_data['response']['status'] )
61
  );
62
  echo '</section>';
63
  }
@@ -162,11 +173,11 @@ class QM_Output_Html_Overview extends QM_Output_Html {
162
  }
163
  }
164
 
165
- echo esc_html( sprintf(
166
- /* translators: %s: Total number of database queries */
167
- _nx( 'Total: %s', 'Total: %s', $db_queries_data['total_qs'], 'database queries', 'query-monitor' ),
168
- number_format_i18n( $db_queries_data['total_qs'] )
169
- ) );
170
 
171
  echo '</p>';
172
  echo '</section>';
19
  add_filter( 'qm/output/title', array( $this, 'admin_title' ), 10 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Overview', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
  $data = $this->collector->get_data();
28
 
57
  if ( $raw_request ) {
58
  echo '<section id="qm-overview-raw-request">';
59
  $raw_data = $raw_request->get_data();
60
+
61
+ if ( ! empty( $raw_data['response']['status'] ) ) {
62
+ $status = $raw_data['response']['status'];
63
+ } else {
64
+ $status = __( 'Unknown HTTP Response Code', 'query-monitor' );
65
+ }
66
+
67
  printf(
68
+ '<h3>%1$s %2$s → %3$s</h3>',
69
  esc_html( $raw_data['request']['method'] ),
70
  esc_html( $raw_data['request']['url'] ),
71
+ esc_html( $status )
72
  );
73
  echo '</section>';
74
  }
173
  }
174
  }
175
 
176
+ printf(
177
+ '<button class="qm-filter-trigger" data-qm-target="db_queries-wpdb" data-qm-filter="type" data-qm-value="">%1$s: %2$s</button>',
178
+ esc_html( _x( 'Total', 'database queries', 'query-monitor' ) ),
179
+ esc_html( number_format_i18n( $db_queries_data['total_qs'] ) )
180
+ );
181
 
182
  echo '</p>';
183
  echo '</section>';
output/html/php_errors.php CHANGED
@@ -21,6 +21,10 @@ class QM_Output_Html_PHP_Errors extends QM_Output_Html {
21
  add_filter( 'qm/output/menu_class', array( $this, 'admin_class' ) );
22
  }
23
 
 
 
 
 
24
  public function output() {
25
 
26
  $data = $this->collector->get_data();
@@ -121,10 +125,13 @@ class QM_Output_Html_PHP_Errors extends QM_Output_Html {
121
  }
122
  }
123
 
124
- echo '<td class="qm-row-caller qm-row-stack qm-nowrap qm-ltr qm-has-toggle"><ol class="qm-toggler qm-numbered">';
125
 
126
- echo self::build_toggler(); // WPCS: XSS ok;
 
 
127
 
 
128
  echo '<li>';
129
  echo self::output_filename( $error['filename'] . ':' . $error['line'], $error['file'], $error['line'], true ); // WPCS: XSS ok.
130
  echo '</li>';
@@ -248,10 +255,23 @@ class QM_Output_Html_PHP_Errors extends QM_Output_Html {
248
  }
249
 
250
  public function panel_menu( array $menu ) {
251
- if ( isset( $menu[ $this->collector->id() ] ) ) {
252
- $menu[ $this->collector->id() ]['title'] = __( 'PHP Errors', 'query-monitor' );
253
  }
254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  return $menu;
256
  }
257
 
21
  add_filter( 'qm/output/menu_class', array( $this, 'admin_class' ) );
22
  }
23
 
24
+ public function name() {
25
+ return __( 'PHP Errors', 'query-monitor' );
26
+ }
27
+
28
  public function output() {
29
 
30
  $data = $this->collector->get_data();
125
  }
126
  }
127
 
128
+ echo '<td class="qm-row-caller qm-row-stack qm-nowrap qm-ltr qm-has-toggle">';
129
 
130
+ if ( ! empty( $stack ) ) {
131
+ echo self::build_toggler(); // WPCS: XSS ok;
132
+ }
133
 
134
+ echo '<ol>';
135
  echo '<li>';
136
  echo self::output_filename( $error['filename'] . ':' . $error['line'], $error['file'], $error['line'], true ); // WPCS: XSS ok.
137
  echo '</li>';
255
  }
256
 
257
  public function panel_menu( array $menu ) {
258
+ if ( ! isset( $menu[ $this->collector->id() ] ) ) {
259
+ return $menu;
260
  }
261
 
262
+ $data = $this->collector->get_data();
263
+ $count = 0;
264
+
265
+ foreach ( $data['errors'] as $errors ) {
266
+ $count += array_sum( wp_list_pluck( $errors, 'calls' ) );
267
+ }
268
+
269
+ $menu[ $this->collector->id() ]['title'] = esc_html( sprintf(
270
+ /* translators: %s: Number of errors */
271
+ __( 'PHP Errors (%s)', 'query-monitor' ),
272
+ number_format_i18n( $count )
273
+ ) );
274
+
275
  return $menu;
276
  }
277
 
output/html/request.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_Request extends QM_Output_Html {
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 50 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
 
24
  $data = $this->collector->get_data();
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 50 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Request', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
output/html/theme.php CHANGED
@@ -20,6 +20,10 @@ class QM_Output_Html_Theme extends QM_Output_Html {
20
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 60 );
21
  }
22
 
 
 
 
 
23
  public function output() {
24
  $data = $this->collector->get_data();
25
 
@@ -34,7 +38,7 @@ class QM_Output_Html_Theme extends QM_Output_Html {
34
  echo '<p>' . esc_html( $data['stylesheet'] ) . '</p>';
35
 
36
  if ( $data['is_child_theme'] ) {
37
- echo '<h3>' . esc_html__( 'Parent Theme:', 'query-monitor' ) . '</h3>';
38
  echo '<p>' . esc_html( $data['template'] ) . '</p>';
39
  }
40
 
@@ -59,22 +63,16 @@ class QM_Output_Html_Theme extends QM_Output_Html {
59
  echo '<p><em>' . esc_html__( 'Unknown', 'query-monitor' ) . '</em></p>';
60
  }
61
 
62
- echo '</section>';
63
-
64
  if ( ! empty( $data['template_hierarchy'] ) ) {
65
- echo '<section>';
66
  echo '<h3>' . esc_html__( 'Template Hierarchy', 'query-monitor' ) . '</h3>';
67
- echo '<ol class="qm-ltr qm-numbered"><li>' . implode( '</li><li>', array_map( 'esc_html', $data['template_hierarchy'] ) ) . '</li></ol>';
68
- echo '</section>';
69
  }
70
 
 
 
71
  echo '<section>';
72
  echo '<h3>' . esc_html__( 'Template Parts', 'query-monitor' ) . '</h3>';
73
 
74
- if ( $data['has_template_part_action'] ) {
75
- echo '<h4>' . esc_html__( 'Loaded', 'query-monitor' ) . '</h4>';
76
- }
77
-
78
  if ( ! empty( $data['template_parts'] ) ) {
79
 
80
  if ( $data['is_child_theme'] ) {
@@ -118,8 +116,15 @@ class QM_Output_Html_Theme extends QM_Output_Html {
118
  echo '<ul>';
119
 
120
  foreach ( $data['unsuccessful_template_parts'] as $requested ) {
 
 
 
 
 
 
 
121
  echo '<li>';
122
- $text = implode( ', ', array_filter( array( $requested['slug'], $requested['name'] ) ) );
123
  echo self::output_filename( $text, $requested['caller']['file'], $requested['caller']['line'], true ); // WPCS: XSS ok.
124
  echo '</li>';
125
  }
20
  add_filter( 'qm/output/panel_menus', array( $this, 'panel_menu' ), 60 );
21
  }
22
 
23
+ public function name() {
24
+ return __( 'Theme', 'query-monitor' );
25
+ }
26
+
27
  public function output() {
28
  $data = $this->collector->get_data();
29
 
38
  echo '<p>' . esc_html( $data['stylesheet'] ) . '</p>';
39
 
40
  if ( $data['is_child_theme'] ) {
41
+ echo '<h3>' . esc_html__( 'Parent Theme', 'query-monitor' ) . '</h3>';
42
  echo '<p>' . esc_html( $data['template'] ) . '</p>';
43
  }
44
 
63
  echo '<p><em>' . esc_html__( 'Unknown', 'query-monitor' ) . '</em></p>';
64
  }
65
 
 
 
66
  if ( ! empty( $data['template_hierarchy'] ) ) {
 
67
  echo '<h3>' . esc_html__( 'Template Hierarchy', 'query-monitor' ) . '</h3>';
68
+ echo '<ol class="qm-ltr"><li>' . implode( '</li><li>', array_map( 'esc_html', $data['template_hierarchy'] ) ) . '</li></ol>';
 
69
  }
70
 
71
+ echo '</section>';
72
+
73
  echo '<section>';
74
  echo '<h3>' . esc_html__( 'Template Parts', 'query-monitor' ) . '</h3>';
75
 
 
 
 
 
76
  if ( ! empty( $data['template_parts'] ) ) {
77
 
78
  if ( $data['is_child_theme'] ) {
116
  echo '<ul>';
117
 
118
  foreach ( $data['unsuccessful_template_parts'] as $requested ) {
119
+ if ( $requested['name'] ) {
120
+ echo '<li>';
121
+ $text = $requested['slug'] . '-' . $requested['name'] . '.php';
122
+ echo self::output_filename( $text, $requested['caller']['file'], $requested['caller']['line'], true ); // WPCS: XSS ok.
123
+ echo '</li>';
124
+ }
125
+
126
  echo '<li>';
127
+ $text = $requested['slug'] . '.php';
128
  echo self::output_filename( $text, $requested['caller']['file'], $requested['caller']['line'], true ); // WPCS: XSS ok.
129
  echo '</li>';
130
  }
output/html/timing.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_Timing extends QM_Output_Html {
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 15 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
 
24
  $data = $this->collector->get_data();
@@ -55,8 +59,9 @@ class QM_Output_Html_Timing extends QM_Output_Html {
55
  echo $file; // WPCS: XSS ok.
56
  echo '</td>';
57
  } else {
58
- echo '<td class="qm-ltr qm-has-toggle"><ol class="qm-toggler">';
59
  echo self::build_toggler(); // WPCS: XSS ok;
 
60
  echo '<li>';
61
  echo $file; // WPCS: XSS ok.
62
  echo '</li>';
@@ -138,8 +143,9 @@ class QM_Output_Html_Timing extends QM_Output_Html {
138
  echo $file; // WPCS: XSS ok.
139
  echo '</td>';
140
  } else {
141
- echo '<td class="qm-ltr qm-has-toggle"><ol class="qm-toggler">';
142
  echo self::build_toggler(); // WPCS: XSS ok;
 
143
  echo '<li>';
144
  echo $file; // WPCS: XSS ok.
145
  echo '</li>';
@@ -175,7 +181,7 @@ class QM_Output_Html_Timing extends QM_Output_Html {
175
  $count += count( $data['warning'] );
176
  }
177
  /* translators: %s: Number of function timing results that are available */
178
- $label = _n( 'Timings (%s)', 'Timings (%s)', $count, 'query-monitor' );
179
 
180
  $menu[ $this->collector->id() ] = $this->menu( array(
181
  'title' => esc_html( sprintf(
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 15 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Timing', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
59
  echo $file; // WPCS: XSS ok.
60
  echo '</td>';
61
  } else {
62
+ echo '<td class="qm-ltr qm-has-toggle">';
63
  echo self::build_toggler(); // WPCS: XSS ok;
64
+ echo '<ol>';
65
  echo '<li>';
66
  echo $file; // WPCS: XSS ok.
67
  echo '</li>';
143
  echo $file; // WPCS: XSS ok.
144
  echo '</td>';
145
  } else {
146
+ echo '<td class="qm-ltr qm-has-toggle">';
147
  echo self::build_toggler(); // WPCS: XSS ok;
148
+ echo '<ol>';
149
  echo '<li>';
150
  echo $file; // WPCS: XSS ok.
151
  echo '</li>';
181
  $count += count( $data['warning'] );
182
  }
183
  /* translators: %s: Number of function timing results that are available */
184
+ $label = __( 'Timings (%s)', 'query-monitor' );
185
 
186
  $menu[ $this->collector->id() ] = $this->menu( array(
187
  'title' => esc_html( sprintf(
output/html/transients.php CHANGED
@@ -19,6 +19,10 @@ class QM_Output_Html_Transients extends QM_Output_Html {
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 100 );
20
  }
21
 
 
 
 
 
22
  public function output() {
23
 
24
  $data = $this->collector->get_data();
@@ -30,7 +34,7 @@ class QM_Output_Html_Transients extends QM_Output_Html {
30
  echo '<thead>';
31
  echo '<tr>';
32
  echo '<th scope="col">' . esc_html__( 'Updated Transient', 'query-monitor' ) . '</th>';
33
- if ( is_multisite() ) {
34
  echo '<th scope="col">' . esc_html_x( 'Type', 'transient type', 'query-monitor' ) . '</th>';
35
  }
36
  echo '<th scope="col">' . esc_html__( 'Expiration', 'query-monitor' ) . '</th>';
@@ -43,19 +47,14 @@ class QM_Output_Html_Transients extends QM_Output_Html {
43
  echo '<tbody>';
44
 
45
  foreach ( $data['trans'] as $row ) {
46
- $transient = str_replace( array(
47
- '_site_transient_',
48
- '_transient_',
49
- ), '', $row['transient'] );
50
-
51
- $component = $row['trace']->get_component();
52
 
53
  echo '<tr>';
54
  printf(
55
  '<td class="qm-ltr"><code>%s</code></td>',
56
- esc_html( $transient )
57
  );
58
- if ( is_multisite() ) {
59
  printf(
60
  '<td class="qm-ltr qm-nowrap">%s</td>',
61
  esc_html( $row['type'] )
@@ -71,32 +70,34 @@ class QM_Output_Html_Transients extends QM_Output_Html {
71
  printf(
72
  '<td class="qm-nowrap">%s <span class="qm-info">(~%s)</span></td>',
73
  esc_html( $row['expiration'] ),
74
- esc_html( human_time_diff( 0, $row['expiration'] ) )
75
  );
76
  }
77
 
78
  printf(
79
  '<td class="qm-nowrap">~%s</td>',
80
- esc_html( size_format( $row['size'] ) )
81
  );
82
 
83
- $stack = array();
84
- $filtered_trace = $row['trace']->get_display_trace();
85
- array_shift( $filtered_trace ); // remove do_action('setted_(site_)?transient')
86
- array_shift( $filtered_trace ); // remove set_(site_)?transient()
87
 
88
- foreach ( $filtered_trace as $item ) {
89
  $stack[] = self::output_filename( $item['display'], $item['calling_file'], $item['calling_line'] );
90
  }
91
 
92
- echo '<td class="qm-has-toggle qm-nowrap qm-ltr"><ol class="qm-toggler qm-numbered">';
93
-
94
  $caller = array_shift( $stack );
95
 
96
- echo "<li>{$caller}</li>"; // WPCS: XSS ok.
97
 
98
  if ( ! empty( $stack ) ) {
99
  echo self::build_toggler(); // WPCS: XSS ok;
 
 
 
 
 
 
 
100
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
101
  }
102
 
@@ -130,7 +131,7 @@ class QM_Output_Html_Transients extends QM_Output_Html {
130
  $title = ( empty( $count ) )
131
  ? __( 'Transient Updates', 'query-monitor' )
132
  /* translators: %s: Number of transient values that were updated */
133
- : _n( 'Transient Updates (%s)', 'Transient Updates (%s)', $count, 'query-monitor' );
134
 
135
  $menu[ $this->collector->id() ] = $this->menu( array(
136
  'title' => esc_html( sprintf(
19
  add_filter( 'qm/output/menus', array( $this, 'admin_menu' ), 100 );
20
  }
21
 
22
+ public function name() {
23
+ return __( 'Transients', 'query-monitor' );
24
+ }
25
+
26
  public function output() {
27
 
28
  $data = $this->collector->get_data();
34
  echo '<thead>';
35
  echo '<tr>';
36
  echo '<th scope="col">' . esc_html__( 'Updated Transient', 'query-monitor' ) . '</th>';
37
+ if ( $data['has_type'] ) {
38
  echo '<th scope="col">' . esc_html_x( 'Type', 'transient type', 'query-monitor' ) . '</th>';
39
  }
40
  echo '<th scope="col">' . esc_html__( 'Expiration', 'query-monitor' ) . '</th>';
47
  echo '<tbody>';
48
 
49
  foreach ( $data['trans'] as $row ) {
50
+ $component = $row['component'];
 
 
 
 
 
51
 
52
  echo '<tr>';
53
  printf(
54
  '<td class="qm-ltr"><code>%s</code></td>',
55
+ esc_html( $row['name'] )
56
  );
57
+ if ( $data['has_type'] ) {
58
  printf(
59
  '<td class="qm-ltr qm-nowrap">%s</td>',
60
  esc_html( $row['type'] )
70
  printf(
71
  '<td class="qm-nowrap">%s <span class="qm-info">(~%s)</span></td>',
72
  esc_html( $row['expiration'] ),
73
+ esc_html( $row['exp_diff'] )
74
  );
75
  }
76
 
77
  printf(
78
  '<td class="qm-nowrap">~%s</td>',
79
+ esc_html( $row['size_formatted'] )
80
  );
81
 
82
+ $stack = array();
 
 
 
83
 
84
+ foreach ( $row['filtered_trace'] as $item ) {
85
  $stack[] = self::output_filename( $item['display'], $item['calling_file'], $item['calling_line'] );
86
  }
87
 
 
 
88
  $caller = array_shift( $stack );
89
 
90
+ echo '<td class="qm-has-toggle qm-nowrap qm-ltr">';
91
 
92
  if ( ! empty( $stack ) ) {
93
  echo self::build_toggler(); // WPCS: XSS ok;
94
+ }
95
+
96
+ echo '<ol>';
97
+
98
+ echo "<li>{$caller}</li>"; // WPCS: XSS ok.
99
+
100
+ if ( ! empty( $stack ) ) {
101
  echo '<div class="qm-toggled"><li>' . implode( '</li><li>', $stack ) . '</li></div>'; // WPCS: XSS ok.
102
  }
103
 
131
  $title = ( empty( $count ) )
132
  ? __( 'Transient Updates', 'query-monitor' )
133
  /* translators: %s: Number of transient values that were updated */
134
+ : __( 'Transient Updates (%s)', 'query-monitor' );
135
 
136
  $menu[ $this->collector->id() ] = $this->menu( array(
137
  'title' => esc_html( sprintf(
query-monitor.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * Plugin Name: Query Monitor
12
  * Description: The Developer Tools Panel for WordPress.
13
- * Version: 3.4.0
14
  * Plugin URI: https://querymonitor.com/
15
  * Author: John Blackbourn
16
  * Author URI: https://querymonitor.com/
10
  *
11
  * Plugin Name: Query Monitor
12
  * Description: The Developer Tools Panel for WordPress.
13
+ * Version: 3.5.0
14
  * Plugin URI: https://querymonitor.com/
15
  * Author: John Blackbourn
16
  * Author URI: https://querymonitor.com/
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: johnbillion
3
  Tags: debug, debug-bar, debugging, development, developer, performance, profiler, queries, query monitor, rest-api
4
  Requires at least: 3.7
5
- Tested up to: 5.2
6
- Stable tag: 3.4.0
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
@@ -46,7 +46,7 @@ In addition to this, you can set an authentication cookie which allows you to vi
46
 
47
  = Privacy Statement =
48
 
49
- Query Monitor does not persistently store any of the data that it collects. It does not send data to any third party, nor does it include any third party resources.
50
 
51
  [Query Monitor's full privacy statement can be found here](https://github.com/johnbillion/query-monitor/wiki/Privacy-Statement).
52
 
@@ -88,7 +88,7 @@ Please use [the issue tracker on Query Monitor's GitHub repo](https://github.com
88
 
89
  = Is Query Monitor available on WordPress.com VIP Go? =
90
 
91
- Yep! You just need to add `define( 'WPCOM_VIP_QM_ENABLE', true );` to your `vip-config/vip-config.php` file.
92
 
93
  = I'm using multiple instances of `wpdb`. How do I get my additional instances to show up in Query Monitor? =
94
 
@@ -105,7 +105,7 @@ Your `wpdb` instance will then show up as a separate panel, and the query time a
105
 
106
  = Can I click on stack traces to open the file in my editor? =
107
 
108
- Yes! You just need to [enable clickable stack traces](https://querymonitor.com/blog/2019/02/clickable-stack-traces-and-function-names-in-query-monitor/).
109
 
110
  = Do you accept donations? =
111
 
2
  Contributors: johnbillion
3
  Tags: debug, debug-bar, debugging, development, developer, performance, profiler, queries, query monitor, rest-api
4
  Requires at least: 3.7
5
+ Tested up to: 5.3
6
+ Stable tag: 3.5.0
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
46
 
47
  = Privacy Statement =
48
 
49
+ Query Monitor is private by default and always will be. It does not persistently store any of the data that it collects. It does not send data to any third party, nor does it include any third party resources.
50
 
51
  [Query Monitor's full privacy statement can be found here](https://github.com/johnbillion/query-monitor/wiki/Privacy-Statement).
52
 
88
 
89
  = Is Query Monitor available on WordPress.com VIP Go? =
90
 
91
+ Yep! However, a user needs to be granted the `view_query_monitor` capability to see Query Monitor even if they're an administrator.
92
 
93
  = I'm using multiple instances of `wpdb`. How do I get my additional instances to show up in Query Monitor? =
94
 
105
 
106
  = Can I click on stack traces to open the file in my editor? =
107
 
108
+ Yes! You can enable this on the Settings panel.
109
 
110
  = Do you accept donations? =
111