Query Monitor - Version 3.3.4

Version Description

Download this release

Release Info

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

Code changes from version 3.3.3 to 3.3.4

assets/query-monitor-dark.css CHANGED
@@ -312,7 +312,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
312
  margin: 4px 0 1px !important;
313
  }
314
  #query-monitor-main #qm-title .qm-button-container-close {
315
- margin-right: 5px !important;
316
  }
317
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
318
  margin: 2px 0 3px !important;
@@ -350,17 +350,21 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
350
  flex-shrink: 0 !important;
351
  overflow-y: scroll !important;
352
  overscroll-behavior: contain !important;
 
353
  }
354
  #query-monitor-main #qm-panel-menu ul {
355
  display: block !important;
356
  list-style: none !important;
357
  margin: 0 !important;
358
  padding: 0 !important;
 
 
359
  }
360
  #query-monitor-main #qm-panel-menu li {
361
  display: list-item !important;
362
  margin: 0 !important;
363
  padding: 0 !important;
 
364
  }
365
  #query-monitor-main #qm-panel-menu li button {
366
  background: #23282d !important;
@@ -1056,3 +1060,5 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
1056
  #query-monitor-main.qm-broken #qm-broken h2 {
1057
  padding: 20px !important;
1058
  }
 
 
312
  margin: 4px 0 1px !important;
313
  }
314
  #query-monitor-main #qm-title .qm-button-container-close {
315
+ margin-right: 10px !important;
316
  }
317
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
318
  margin: 2px 0 3px !important;
350
  flex-shrink: 0 !important;
351
  overflow-y: scroll !important;
352
  overscroll-behavior: contain !important;
353
+ height: auto !important;
354
  }
355
  #query-monitor-main #qm-panel-menu ul {
356
  display: block !important;
357
  list-style: none !important;
358
  margin: 0 !important;
359
  padding: 0 !important;
360
+ width: auto !important;
361
+ height: auto !important;
362
  }
363
  #query-monitor-main #qm-panel-menu li {
364
  display: list-item !important;
365
  margin: 0 !important;
366
  padding: 0 !important;
367
+ height: auto !important;
368
  }
369
  #query-monitor-main #qm-panel-menu li button {
370
  background: #23282d !important;
1060
  #query-monitor-main.qm-broken #qm-broken h2 {
1061
  padding: 20px !important;
1062
  }
1063
+
1064
+ /*# sourceMappingURL=query-monitor-dark.css.map */
assets/query-monitor.css CHANGED
@@ -305,7 +305,7 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
305
  margin: 4px 0 1px !important;
306
  }
307
  #query-monitor-main #qm-title .qm-button-container-close {
308
- margin-right: 5px !important;
309
  }
310
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
311
  margin: 2px 0 3px !important;
@@ -343,17 +343,21 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
343
  flex-shrink: 0 !important;
344
  overflow-y: scroll !important;
345
  overscroll-behavior: contain !important;
 
346
  }
347
  #query-monitor-main #qm-panel-menu ul {
348
  display: block !important;
349
  list-style: none !important;
350
  margin: 0 !important;
351
  padding: 0 !important;
 
 
352
  }
353
  #query-monitor-main #qm-panel-menu li {
354
  display: list-item !important;
355
  margin: 0 !important;
356
  padding: 0 !important;
 
357
  }
358
  #query-monitor-main #qm-panel-menu li button {
359
  background: #f3f3f3 !important;
@@ -1049,3 +1053,5 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
1049
  #query-monitor-main.qm-broken #qm-broken h2 {
1050
  padding: 20px !important;
1051
  }
 
 
305
  margin: 4px 0 1px !important;
306
  }
307
  #query-monitor-main #qm-title .qm-button-container-close {
308
+ margin-right: 10px !important;
309
  }
310
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
311
  margin: 2px 0 3px !important;
343
  flex-shrink: 0 !important;
344
  overflow-y: scroll !important;
345
  overscroll-behavior: contain !important;
346
+ height: auto !important;
347
  }
348
  #query-monitor-main #qm-panel-menu ul {
349
  display: block !important;
350
  list-style: none !important;
351
  margin: 0 !important;
352
  padding: 0 !important;
353
+ width: auto !important;
354
+ height: auto !important;
355
  }
356
  #query-monitor-main #qm-panel-menu li {
357
  display: list-item !important;
358
  margin: 0 !important;
359
  padding: 0 !important;
360
+ height: auto !important;
361
  }
362
  #query-monitor-main #qm-panel-menu li button {
363
  background: #f3f3f3 !important;
1053
  #query-monitor-main.qm-broken #qm-broken h2 {
1054
  padding: 20px !important;
1055
  }
1056
+
1057
+ /*# sourceMappingURL=query-monitor.css.map */
classes/debug_bar.php CHANGED
@@ -47,11 +47,13 @@ class Debug_Bar {
47
  }
48
 
49
  public function ensure_ajaxurl() {
50
- ?>
51
- <script type="text/javascript">
52
- var ajaxurl = '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>';
53
- </script>
54
- <?php
 
 
55
  }
56
 
57
  public function Debug_Bar() {
47
  }
48
 
49
  public function ensure_ajaxurl() {
50
+ if ( $this->panels && QM_Dispatchers::get( 'html' )->user_can_view() ) {
51
+ ?>
52
+ <script type="text/javascript">
53
+ var ajaxurl = '<?php echo esc_url( admin_url( 'admin-ajax.php' ) ); ?>';
54
+ </script>
55
+ <?php
56
+ }
57
  }
58
 
59
  public function Debug_Bar() {
collectors/assets.php CHANGED
@@ -53,6 +53,14 @@ abstract class QM_Collector_Assets extends QM_Collector {
53
  'footer',
54
  );
55
 
 
 
 
 
 
 
 
 
56
  $type = $this->get_dependency_type();
57
 
58
  foreach ( array( 'header', 'footer' ) as $position ) {
@@ -96,12 +104,6 @@ abstract class QM_Collector_Assets extends QM_Collector {
96
  $all_dependencies = array();
97
  $all_dependents = array();
98
 
99
- $this->data['counts'] = array(
100
- 'header' => 0,
101
- 'footer' => 0,
102
- 'total' => 0,
103
- );
104
-
105
  foreach ( $positions as $position ) {
106
  if ( empty( $this->data[ $position ] ) ) {
107
  continue;
53
  'footer',
54
  );
55
 
56
+ $this->data['counts'] = array(
57
+ 'missing' => 0,
58
+ 'broken' => 0,
59
+ 'header' => 0,
60
+ 'footer' => 0,
61
+ 'total' => 0,
62
+ );
63
+
64
  $type = $this->get_dependency_type();
65
 
66
  foreach ( array( 'header', 'footer' ) as $position ) {
104
  $all_dependencies = array();
105
  $all_dependents = array();
106
 
 
 
 
 
 
 
107
  foreach ( $positions as $position ) {
108
  if ( empty( $this->data[ $position ] ) ) {
109
  continue;
collectors/cache.php CHANGED
@@ -20,17 +20,19 @@ class QM_Collector_Cache extends QM_Collector {
20
  $this->data['cache_hit_percentage'] = 0;
21
 
22
  if ( is_object( $wp_object_cache ) ) {
23
- if ( property_exists( $wp_object_cache, 'cache_hits' ) ) {
 
 
24
  $this->data['stats']['cache_hits'] = (int) $wp_object_cache->cache_hits;
25
  }
26
 
27
- if ( property_exists( $wp_object_cache, 'cache_misses' ) ) {
28
  $this->data['stats']['cache_misses'] = (int) $wp_object_cache->cache_misses;
29
  }
30
 
31
  if ( method_exists( $wp_object_cache, 'getStats' ) ) {
32
  $stats = $wp_object_cache->getStats();
33
- } elseif ( property_exists( $wp_object_cache, 'stats' ) && is_array( $wp_object_cache->stats ) ) {
34
  $stats = $wp_object_cache->stats;
35
  } elseif ( function_exists( 'wp_cache_get_stats' ) ) {
36
  $stats = wp_cache_get_stats();
20
  $this->data['cache_hit_percentage'] = 0;
21
 
22
  if ( is_object( $wp_object_cache ) ) {
23
+ $object_vars = get_object_vars( $wp_object_cache );
24
+
25
+ if ( array_key_exists( 'cache_hits', $object_vars ) ) {
26
  $this->data['stats']['cache_hits'] = (int) $wp_object_cache->cache_hits;
27
  }
28
 
29
+ if ( array_key_exists( 'cache_misses', $object_vars ) ) {
30
  $this->data['stats']['cache_misses'] = (int) $wp_object_cache->cache_misses;
31
  }
32
 
33
  if ( method_exists( $wp_object_cache, 'getStats' ) ) {
34
  $stats = $wp_object_cache->getStats();
35
+ } elseif ( array_key_exists( 'stats', $object_vars ) && is_array( $wp_object_cache->stats ) ) {
36
  $stats = $wp_object_cache->stats;
37
  } elseif ( function_exists( 'wp_cache_get_stats' ) ) {
38
  $stats = wp_cache_get_stats();
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.3.3
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.3.4
14
  * Plugin URI: https://querymonitor.com/
15
  * Author: John Blackbourn
16
  * Author URI: https://querymonitor.com/
readme.txt CHANGED
@@ -3,7 +3,7 @@ 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.1
6
- Stable tag: 3.3.3
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
@@ -52,13 +52,13 @@ Query Monitor does not persistently store any of the data that it collects. It d
52
 
53
  == Screenshots ==
54
 
55
- 1. The admin toolbar menu showing an overview
56
- 2. Aggregate database queries by component
57
- 3. User capability checks with an active filter
58
- 4. Database queries complete with filter controls
59
- 5. Hooks and actions
60
- 6. HTTP requests (showing an HTTP error)
61
- 7. Aggregate database queries grouped by calling function
62
 
63
  == Frequently Asked Questions ==
64
 
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.1
6
+ Stable tag: 3.3.4
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
52
 
53
  == Screenshots ==
54
 
55
+ 1. Admin Toolbar Menu
56
+ 2. Aggregate Database Queries by Component
57
+ 3. Capability Checks
58
+ 4. Database Queries
59
+ 5. Hooks and Actions
60
+ 6. HTTP API Requests
61
+ 7. Aggregate Database Queries by Calling Function
62
 
63
  == Frequently Asked Questions ==
64