Query Monitor - Version 2.16.2

Version Description

Download this release

Release Info

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

Code changes from version 2.16.1 to 2.16.2

assets/query-monitor.js CHANGED
@@ -154,6 +154,7 @@ jQuery( function($) {
154
  var filter = $(this).attr('data-filter'),
155
  table = $(this).closest('table'),
156
  tr = table.find('tbody tr[data-qm-' + filter + ']'),
 
157
  val = $(this).val().replace(/[[\]()'"\\]/g, "\\$&"),
158
  total = tr.removeClass('qm-hide-' + filter).length,
159
  hilite = $(this).attr('data-highlight'),
@@ -162,7 +163,7 @@ jQuery( function($) {
162
  if ( window.localStorage ) {
163
  key = $(this).attr('id');
164
  if ( val ) {
165
- localStorage.setItem( key, val );
166
  } else {
167
  localStorage.removeItem( key );
168
  }
@@ -200,7 +201,12 @@ jQuery( function($) {
200
  $('#qm').find('.qm-filter').each(function () {
201
  var key = $(this).attr('id');
202
  var value = localStorage.getItem( key );
203
- if ( value !== null && $(this).find('option[value="' + value + '"]').length ) {
 
 
 
 
 
204
  $(this).val(value).change();
205
  }
206
  });
154
  var filter = $(this).attr('data-filter'),
155
  table = $(this).closest('table'),
156
  tr = table.find('tbody tr[data-qm-' + filter + ']'),
157
+ // Escape the following chars with a backslash before passing into jQ selectors: [ ] ( ) ' " \
158
  val = $(this).val().replace(/[[\]()'"\\]/g, "\\$&"),
159
  total = tr.removeClass('qm-hide-' + filter).length,
160
  hilite = $(this).attr('data-highlight'),
163
  if ( window.localStorage ) {
164
  key = $(this).attr('id');
165
  if ( val ) {
166
+ localStorage.setItem( key, $(this).val() );
167
  } else {
168
  localStorage.removeItem( key );
169
  }
201
  $('#qm').find('.qm-filter').each(function () {
202
  var key = $(this).attr('id');
203
  var value = localStorage.getItem( key );
204
+ if ( value !== null ) {
205
+ // Escape the following chars with a backslash before passing into jQ selectors: [ ] ( ) ' " \
206
+ var val = value.replace(/[[\]()'"\\]/g, "\\$&");
207
+ if ( ! $(this).find('option[value="' + val + '"]').length ) {
208
+ $('<option>').attr('value',value).text(value).appendTo(this);
209
+ }
210
  $(this).val(value).change();
211
  }
212
  });
output/html/caps.php CHANGED
@@ -116,6 +116,11 @@ class QM_Output_Html_Caps extends QM_Output_Html {
116
  $trace = $row['trace']->get_trace();
117
  $filtered_trace = $row['trace']->get_display_trace();
118
 
 
 
 
 
 
119
  array_pop( $filtered_trace ); // remove the WP_User->has_cap() call
120
  array_pop( $filtered_trace ); // remove the *_user_can() call
121
 
116
  $trace = $row['trace']->get_trace();
117
  $filtered_trace = $row['trace']->get_display_trace();
118
 
119
+ $last = end( $filtered_trace );
120
+ if ( isset( $last['function'] ) && 'map_meta_cap' === $last['function'] ) {
121
+ array_pop( $filtered_trace ); // remove the map_meta_cap() call
122
+ }
123
+
124
  array_pop( $filtered_trace ); // remove the WP_User->has_cap() call
125
  array_pop( $filtered_trace ); // remove the *_user_can() call
126
 
query-monitor.php CHANGED
@@ -10,7 +10,7 @@
10
  *
11
  * Plugin Name: Query Monitor
12
  * Description: Monitoring of database queries, hooks, conditionals and more.
13
- * Version: 2.16.1
14
  * Plugin URI: https://github.com/johnbillion/query-monitor
15
  * Author: John Blackbourn
16
  * Author URI: https://johnblackbourn.com/
10
  *
11
  * Plugin Name: Query Monitor
12
  * Description: Monitoring of database queries, hooks, conditionals and more.
13
+ * Version: 2.16.2
14
  * Plugin URI: https://github.com/johnbillion/query-monitor
15
  * Author: John Blackbourn
16
  * Author URI: https://johnblackbourn.com/
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: johnbillion
3
  Tags: ajax, debug, debug-bar, debugging, development, developer, performance, profiler, profiling, queries, query monitor, rest-api
4
  Requires at least: 3.7
5
  Tested up to: 4.9
6
- Stable tag: 2.16.1
7
  License: GPLv2 or later
8
 
9
  View debugging and performance information on database queries, hooks, conditionals, HTTP requests, redirects and more.
3
  Tags: ajax, debug, debug-bar, debugging, development, developer, performance, profiler, profiling, queries, query monitor, rest-api
4
  Requires at least: 3.7
5
  Tested up to: 4.9
6
+ Stable tag: 2.16.2
7
  License: GPLv2 or later
8
 
9
  View debugging and performance information on database queries, hooks, conditionals, HTTP requests, redirects and more.