Query Monitor - Version 2.13.3

Version Description

Download this release

Release Info

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

Code changes from version 2.13.2 to 2.13.3

assets/query-monitor.css CHANGED
@@ -442,6 +442,11 @@ body.wp-admin.folded #qm {
442
  color: #777 !important;
443
  }
444
 
 
 
 
 
 
445
  .qm td .qm-toggled {
446
  display: none;
447
  }
@@ -466,7 +471,8 @@ body.wp-admin.folded #qm {
466
  text-decoration: underline !important;
467
  }
468
 
469
- .qm .qm-toggle {
 
470
  color: #0073aa !important;
471
  padding: 5px 8px !important;
472
  border-top: none !important;
@@ -479,6 +485,7 @@ body.wp-admin.folded #qm {
479
  position: absolute !important;
480
  top: 0 !important;
481
  right: 0 !important;
 
482
  background: #fff !important;
483
  cursor: pointer !important;
484
  }
@@ -621,11 +628,6 @@ select.qm-filter {
621
 
622
  /* RTL */
623
 
624
- html[dir="rtl"] .qm-ltr {
625
- direction: ltr !important;
626
- text-align: right !important;
627
- }
628
-
629
  html[dir="rtl"] body.wp-admin #qm {
630
  margin-right: 160px !important;
631
  margin-left: 0 !important;
@@ -650,19 +652,22 @@ html[dir="rtl"] body.wp-admin.folded #qm {
650
  margin-left: 0 !important;
651
  }
652
 
653
- html[dir="rtl"] #qm {
654
- text-align: right !important;
655
- }
656
-
657
  html[dir="rtl"] .qm td,
658
  html[dir="rtl"] .qm th {
659
  text-align: right !important;
660
  }
661
 
 
 
 
 
 
 
 
662
  html[dir="rtl"] .qm .qm-toggle {
663
- border-top: none !important;
664
  border-right: 1px solid #e8e8e8 !important;
665
- border-bottom: 1px solid #e8e8e8 !important;
666
  border-left: none !important;
667
  right: auto !important;
668
  left: 1px !important;
442
  color: #777 !important;
443
  }
444
 
445
+ .qm .qm-supplemental {
446
+ margin-right: 0.75em !important;
447
+ margin-left: 0.75em !important;
448
+ }
449
+
450
  .qm td .qm-toggled {
451
  display: none;
452
  }
471
  text-decoration: underline !important;
472
  }
473
 
474
+ .qm .qm-toggle,
475
+ html[dir="rtl"] .qm .qm-ltr .qm-toggle {
476
  color: #0073aa !important;
477
  padding: 5px 8px !important;
478
  border-top: none !important;
485
  position: absolute !important;
486
  top: 0 !important;
487
  right: 0 !important;
488
+ left: auto !important;
489
  background: #fff !important;
490
  cursor: pointer !important;
491
  }
628
 
629
  /* RTL */
630
 
 
 
 
 
 
631
  html[dir="rtl"] body.wp-admin #qm {
632
  margin-right: 160px !important;
633
  margin-left: 0 !important;
652
  margin-left: 0 !important;
653
  }
654
 
655
+ html[dir="rtl"] #qm,
656
+ html[dir="rtl"] .qm caption,
 
 
657
  html[dir="rtl"] .qm td,
658
  html[dir="rtl"] .qm th {
659
  text-align: right !important;
660
  }
661
 
662
+ html[dir="rtl"] #wpadminbar .quicklinks .menupop ul li.qm-ltr,
663
+ html[dir="rtl"] .qm .qm-filter,
664
+ html[dir="rtl"] .qm .qm-ltr {
665
+ direction: ltr !important;
666
+ text-align: left !important;
667
+ }
668
+
669
  html[dir="rtl"] .qm .qm-toggle {
 
670
  border-right: 1px solid #e8e8e8 !important;
 
671
  border-left: none !important;
672
  right: auto !important;
673
  left: 1px !important;
collectors/cache.php CHANGED
@@ -26,18 +26,19 @@ class QM_Collector_Cache extends QM_Collector {
26
  global $wp_object_cache;
27
 
28
  $this->data['ext_object_cache'] = (bool) wp_using_ext_object_cache();
 
29
 
30
  if ( is_object( $wp_object_cache ) ) {
31
 
32
- if ( isset( $wp_object_cache->cache_hits ) ) {
33
- $this->data['stats']['cache_hits'] = $wp_object_cache->cache_hits;
34
  }
35
 
36
- if ( isset( $wp_object_cache->cache_misses ) ) {
37
- $this->data['stats']['cache_misses'] = $wp_object_cache->cache_misses;
38
  }
39
 
40
- if ( isset( $wp_object_cache->stats ) ) {
41
  foreach ( $wp_object_cache->stats as $key => $value ) {
42
  if ( ! is_scalar( $value ) ) {
43
  continue;
@@ -53,6 +54,8 @@ class QM_Collector_Cache extends QM_Collector {
53
  $this->data['cache_hit_percentage'] = ( 100 / $total ) * $this->data['stats']['cache_hits'];
54
  }
55
 
 
 
56
  }
57
 
58
  }
26
  global $wp_object_cache;
27
 
28
  $this->data['ext_object_cache'] = (bool) wp_using_ext_object_cache();
29
+ $this->data['cache_hit_percentage'] = 0;
30
 
31
  if ( is_object( $wp_object_cache ) ) {
32
 
33
+ if ( property_exists( $wp_object_cache, 'cache_hits' ) ) {
34
+ $this->data['stats']['cache_hits'] = (int) $wp_object_cache->cache_hits;
35
  }
36
 
37
+ if ( property_exists( $wp_object_cache, 'cache_misses' ) ) {
38
+ $this->data['stats']['cache_misses'] = (int) $wp_object_cache->cache_misses;
39
  }
40
 
41
+ if ( property_exists( $wp_object_cache, 'stats' ) && is_array( $wp_object_cache->stats ) ) {
42
  foreach ( $wp_object_cache->stats as $key => $value ) {
43
  if ( ! is_scalar( $value ) ) {
44
  continue;
54
  $this->data['cache_hit_percentage'] = ( 100 / $total ) * $this->data['stats']['cache_hits'];
55
  }
56
 
57
+ $this->data['display_hit_rate_warning'] = ( 100 == $this->data['cache_hit_percentage'] );
58
+
59
  }
60
 
61
  }
collectors/debug_bar.php CHANGED
@@ -25,8 +25,7 @@ final class QM_Collector_Debug_Bar extends QM_Collector {
25
 
26
  public function name() {
27
  $title = $this->get_panel()->title();
28
- /* translators: %s: Name of a Debug Bar panel */
29
- return sprintf( __( 'Debug Bar: %s', 'query-monitor' ), $title );
30
  }
31
 
32
  public function set_panel( Debug_Bar_Panel $panel ) {
25
 
26
  public function name() {
27
  $title = $this->get_panel()->title();
28
+ return sprintf( 'Debug Bar: %s', $title );
 
29
  }
30
 
31
  public function set_panel( Debug_Bar_Panel $panel ) {
output/Html.php CHANGED
@@ -199,7 +199,7 @@ abstract class QM_Output_Html extends QM_Output {
199
  }
200
  $return = esc_html( $text );
201
  if ( $fallback !== $text ) {
202
- $return .= '<br><span class="qm-info">&nbsp;' . esc_html( $fallback ) . '</span>';
203
  }
204
  return $return;
205
  }
199
  }
200
  $return = esc_html( $text );
201
  if ( $fallback !== $text ) {
202
+ $return .= '<br><span class="qm-info qm-supplemental">' . esc_html( $fallback ) . '</span>';
203
  }
204
  return $return;
205
  }
output/html/assets.php CHANGED
@@ -169,7 +169,7 @@ class QM_Output_Html_Assets extends QM_Output_Html {
169
  $highlight_deps = array_map( array( $this, '_prefix_type' ), $deps );
170
  $highlight_dependents = array_map( array( $this, '_prefix_type' ), $dependents );
171
 
172
- echo '<th scope="row" class="qm-wrap">' . esc_html( $dependency->handle ) . '<br><span class="qm-info">&nbsp;';
173
  if ( is_wp_error( $source ) ) {
174
  printf( '<span class="qm-warn">%s</span>',
175
  esc_html( $src )
@@ -178,9 +178,9 @@ class QM_Output_Html_Assets extends QM_Output_Html {
178
  echo esc_html( $src );
179
  }
180
  echo '</span></td>';
181
- echo '<td class="qm-nowrap qm-highlighter" data-qm-highlight="' . esc_attr( implode( ' ', $highlight_deps ) ) . '"><ul><li>' . implode( '</li><li>', array_map( 'esc_html', $deps ) ) . '</li></ul></td>';
182
- echo '<td class="qm-nowrap qm-highlighter" data-qm-highlight="' . esc_attr( implode( ' ', $highlight_dependents ) ) . '"><ul><li>' . implode( '</li><li>', array_map( 'esc_html', $dependents ) ) . '</li></ul></td>';
183
- echo '<td>' . esc_html( $ver ) . '</td>';
184
 
185
  }
186
 
169
  $highlight_deps = array_map( array( $this, '_prefix_type' ), $deps );
170
  $highlight_dependents = array_map( array( $this, '_prefix_type' ), $dependents );
171
 
172
+ echo '<th scope="row" class="qm-wrap qm-ltr">' . esc_html( $dependency->handle ) . '<br><span class="qm-info qm-supplemental">';
173
  if ( is_wp_error( $source ) ) {
174
  printf( '<span class="qm-warn">%s</span>',
175
  esc_html( $src )
178
  echo esc_html( $src );
179
  }
180
  echo '</span></td>';
181
+ echo '<td class="qm-ltr qm-nowrap qm-highlighter" data-qm-highlight="' . esc_attr( implode( ' ', $highlight_deps ) ) . '"><ul><li>' . implode( '</li><li>', array_map( 'esc_html', $deps ) ) . '</li></ul></td>';
182
+ echo '<td class="qm-ltr qm-nowrap qm-highlighter" data-qm-highlight="' . esc_attr( implode( ' ', $highlight_dependents ) ) . '"><ul><li>' . implode( '</li><li>', array_map( 'esc_html', $dependents ) ) . '</li></ul></td>';
183
+ echo '<td class="qm-ltr">' . esc_html( $ver ) . '</td>';
184
 
185
  }
186
 
output/html/db_callers.php CHANGED
@@ -40,7 +40,7 @@ class QM_Output_Html_DB_Callers extends QM_Output_Html {
40
  echo '<th scope="col">' . esc_html__( 'Caller', 'query-monitor' ) . '</th>';
41
 
42
  foreach ( $data['types'] as $type_name => $type_count ) {
43
- echo '<th scope="col" class="qm-num">';
44
  echo esc_html( $type_name );
45
  echo $this->build_sorter(); // WPCS: XSS ok;
46
  echo '</th>';
40
  echo '<th scope="col">' . esc_html__( 'Caller', 'query-monitor' ) . '</th>';
41
 
42
  foreach ( $data['types'] as $type_name => $type_count ) {
43
+ echo '<th scope="col" class="qm-num qm-ltr">';
44
  echo esc_html( $type_name );
45
  echo $this->build_sorter(); // WPCS: XSS ok;
46
  echo '</th>';
output/html/db_dupes.php CHANGED
@@ -73,7 +73,7 @@ class QM_Output_Html_DB_Dupes extends QM_Output_Html {
73
  echo '<td class="qm-row-caller qm-nowrap qm-ltr">';
74
  foreach ( $data['dupe_callers'][ $sql ] as $caller => $calls ) {
75
  printf(
76
- '<a href="#" class="qm-filter-trigger" data-qm-target="db_queries-wpdb" data-qm-filter="caller" data-qm-value="%s">%s</a><br><span class="qm-info">&nbsp;%s</span><br>',
77
  esc_attr( $caller ),
78
  esc_html( $caller ),
79
  esc_html( sprintf(
@@ -87,7 +87,7 @@ class QM_Output_Html_DB_Dupes extends QM_Output_Html {
87
  echo '<td class="qm-row-component qm-nowrap">';
88
  foreach ( $data['dupe_components'][ $sql ] as $component => $calls ) {
89
  printf(
90
- '%s<br><span class="qm-info">&nbsp;%s</span><br>',
91
  esc_html( $component ),
92
  esc_html( sprintf(
93
  translate_nooped_plural( $call_text, $calls, 'query-monitor' ),
@@ -100,7 +100,7 @@ class QM_Output_Html_DB_Dupes extends QM_Output_Html {
100
  echo '<td class="qm-row-caller qm-nowrap qm-ltr">';
101
  foreach ( $data['dupe_sources'][ $sql ] as $source => $calls ) {
102
  printf(
103
- '%s<br><span class="qm-info">&nbsp;%s</span><br>',
104
  esc_html( $source ),
105
  esc_html( sprintf(
106
  translate_nooped_plural( $call_text, $calls, 'query-monitor' ),
73
  echo '<td class="qm-row-caller qm-nowrap qm-ltr">';
74
  foreach ( $data['dupe_callers'][ $sql ] as $caller => $calls ) {
75
  printf(
76
+ '<a href="#" class="qm-filter-trigger" data-qm-target="db_queries-wpdb" data-qm-filter="caller" data-qm-value="%s">%s</a><br><span class="qm-info qm-supplemental">%s</span><br>',
77
  esc_attr( $caller ),
78
  esc_html( $caller ),
79
  esc_html( sprintf(
87
  echo '<td class="qm-row-component qm-nowrap">';
88
  foreach ( $data['dupe_components'][ $sql ] as $component => $calls ) {
89
  printf(
90
+ '%s<br><span class="qm-info qm-supplemental">%s</span><br>',
91
  esc_html( $component ),
92
  esc_html( sprintf(
93
  translate_nooped_plural( $call_text, $calls, 'query-monitor' ),
100
  echo '<td class="qm-row-caller qm-nowrap qm-ltr">';
101
  foreach ( $data['dupe_sources'][ $sql ] as $source => $calls ) {
102
  printf(
103
+ '%s<br><span class="qm-info qm-supplemental">%s</span><br>',
104
  esc_html( $source ),
105
  esc_html( sprintf(
106
  translate_nooped_plural( $call_text, $calls, 'query-monitor' ),
output/html/environment.php CHANGED
@@ -73,7 +73,7 @@ class QM_Output_Html_Environment extends QM_Output_Html {
73
 
74
  if ( $val['after'] !== $val['before'] ) {
75
  printf(
76
- '<br><span class="qm-info">&nbsp;%s</span>',
77
  esc_html( sprintf(
78
  /* translators: %s: Original value of a variable */
79
  __( 'Overridden at runtime from %s', 'query-monitor' ),
@@ -86,12 +86,12 @@ class QM_Output_Html_Environment extends QM_Output_Html {
86
  echo '</tr>';
87
  }
88
 
89
- $error_levels = implode( '</li><li>&nbsp;', array_map( 'esc_html', $this->collector->get_error_levels( $data['php']['error_reporting'] ) ) );
90
 
91
  echo '<tr>';
92
  echo '<th scope="row">error_reporting</th>';
93
  echo '<td class="qm-wrap">' . esc_html( $data['php']['error_reporting'] );
94
- echo "<ul class='qm-info'><li>&nbsp;{$error_levels}</li></ul>"; // WPCS: XSS ok.
95
  echo '</td>';
96
  echo '</tr>';
97
 
@@ -139,8 +139,7 @@ class QM_Output_Html_Environment extends QM_Output_Html {
139
  echo '<tr>';
140
 
141
  $first = true;
142
- /* translators: %s: Search term */
143
- $search = __( 'https://www.google.com/search?q=mysql+performance+%s', 'query-monitor' );
144
 
145
  foreach ( $db['variables'] as $setting ) {
146
 
@@ -165,7 +164,7 @@ class QM_Output_Html_Environment extends QM_Output_Html {
165
 
166
  if ( is_numeric( $val ) and ( $val >= ( 1024*1024 ) ) ) {
167
  $append .= sprintf(
168
- '<br><span class="qm-info">&nbsp;~%s</span>',
169
  esc_html( size_format( $val ) )
170
  );
171
  }
@@ -173,7 +172,7 @@ class QM_Output_Html_Environment extends QM_Output_Html {
173
  $class = ( $show_warning ) ? 'qm-warn' : '';
174
 
175
  if ( !$first ) {
176
- echo '<tr class="' . esc_attr( $class ) . '"">';
177
  }
178
 
179
  echo '<th scope="row">' . esc_html( $key ) . '</th>';
73
 
74
  if ( $val['after'] !== $val['before'] ) {
75
  printf(
76
+ '<br><span class="qm-info qm-supplemental">%s</span>',
77
  esc_html( sprintf(
78
  /* translators: %s: Original value of a variable */
79
  __( 'Overridden at runtime from %s', 'query-monitor' ),
86
  echo '</tr>';
87
  }
88
 
89
+ $error_levels = implode( '</li><li>', array_map( 'esc_html', $this->collector->get_error_levels( $data['php']['error_reporting'] ) ) );
90
 
91
  echo '<tr>';
92
  echo '<th scope="row">error_reporting</th>';
93
  echo '<td class="qm-wrap">' . esc_html( $data['php']['error_reporting'] );
94
+ echo "<ul class='qm-info qm-supplemental'><li>{$error_levels}</li></ul>"; // WPCS: XSS ok.
95
  echo '</td>';
96
  echo '</tr>';
97
 
139
  echo '<tr>';
140
 
141
  $first = true;
142
+ $search = 'https://www.google.com/search?q=mysql+performance+%s';
 
143
 
144
  foreach ( $db['variables'] as $setting ) {
145
 
164
 
165
  if ( is_numeric( $val ) and ( $val >= ( 1024*1024 ) ) ) {
166
  $append .= sprintf(
167
+ '<br><span class="qm-info qm-supplemental">~%s</span>',
168
  esc_html( size_format( $val ) )
169
  );
170
  }
172
  $class = ( $show_warning ) ? 'qm-warn' : '';
173
 
174
  if ( !$first ) {
175
+ echo '<tr class="' . esc_attr( $class ) . '">';
176
  }
177
 
178
  echo '<th scope="row">' . esc_html( $key ) . '</th>';
output/html/hooks.php CHANGED
@@ -102,7 +102,7 @@ class QM_Output_Html_Hooks extends QM_Output_Html {
102
 
103
  if ( $first ) {
104
 
105
- echo '<th scope="row" rowspan="' . absint( $rowspan ) . '" class="qm-nowrap">';
106
  echo $hook_name; // WPCS: XSS ok.
107
  if ( 'all' === $hook['name'] ) {
108
  echo '<br><span class="qm-warn">';
@@ -146,7 +146,7 @@ class QM_Output_Html_Hooks extends QM_Output_Html {
146
 
147
  } else {
148
  echo "<tr{$attr}>"; // WPCS: XSS ok.
149
- echo '<th scope="row">';
150
  echo $hook_name; // WPCS: XSS ok.
151
  echo '</th>';
152
  echo '<td colspan="3">&nbsp;</td>';
102
 
103
  if ( $first ) {
104
 
105
+ echo '<th scope="row" rowspan="' . absint( $rowspan ) . '" class="qm-nowrap qm-ltr">';
106
  echo $hook_name; // WPCS: XSS ok.
107
  if ( 'all' === $hook['name'] ) {
108
  echo '<br><span class="qm-warn">';
146
 
147
  } else {
148
  echo "<tr{$attr}>"; // WPCS: XSS ok.
149
+ echo '<th scope="row" class="qm-ltr">';
150
  echo $hook_name; // WPCS: XSS ok.
151
  echo '</th>';
152
  echo '<td colspan="3">&nbsp;</td>';
output/html/languages.php CHANGED
@@ -53,7 +53,7 @@ class QM_Output_Html_Languages extends QM_Output_Html {
53
 
54
  echo '<tr>';
55
 
56
- echo '<td>' . esc_html( $mofile['domain'] ) . '</td>';
57
  echo '<td class="qm-nowrap qm-ltr">';
58
  echo self::output_filename( $mofile['caller']['display'], $mofile['caller']['file'], $mofile['caller']['line'] ); // WPCS: XSS ok.
59
  echo '</td>';
53
 
54
  echo '<tr>';
55
 
56
+ echo '<td class="qm-ltr">' . esc_html( $mofile['domain'] ) . '</td>';
57
  echo '<td class="qm-nowrap qm-ltr">';
58
  echo self::output_filename( $mofile['caller']['display'], $mofile['caller']['file'], $mofile['caller']['line'] ); // WPCS: XSS ok.
59
  echo '</td>';
output/html/overview.php CHANGED
@@ -57,9 +57,7 @@ class QM_Output_Html_Overview extends QM_Output_Html {
57
  echo '<th scope="col">' . esc_html__( 'Database query time', 'query-monitor' ) . '</th>';
58
  echo '<th scope="col">' . esc_html__( 'Database queries', 'query-monitor' ) . '</th>';
59
  }
60
- if ( isset( $cache_hit_percentage ) ) {
61
- echo '<th scope="col">' . esc_html__( 'Object cache', 'query-monitor' ) . '</th>';
62
- }
63
  echo '</tr>';
64
  echo '</thead>';
65
 
@@ -112,20 +110,39 @@ class QM_Output_Html_Overview extends QM_Output_Html {
112
  echo '</td>';
113
  }
114
 
 
115
  if ( isset( $cache_hit_percentage ) ) {
116
- echo '<td>';
117
  echo esc_html( sprintf(
118
- /* translators: %s: Cache hit rate percentage */
119
- __( '%s%% hit rate', 'query-monitor' ),
120
- number_format_i18n( $cache_hit_percentage, 1 )
 
 
121
  ) );
 
 
 
 
 
 
 
122
  echo '<br><span class="qm-info">';
123
- echo ( $cache_data['ext_object_cache'] )
124
- ? esc_html__( 'External object cache in use', 'query-monitor' )
125
- : esc_html__( 'External object cache not in use', 'query-monitor' );
 
 
 
 
 
 
 
 
 
 
126
  echo '</span>';
127
- echo '</td>';
128
  }
 
129
 
130
  echo '</tr>';
131
  echo '</tbody>';
57
  echo '<th scope="col">' . esc_html__( 'Database query time', 'query-monitor' ) . '</th>';
58
  echo '<th scope="col">' . esc_html__( 'Database queries', 'query-monitor' ) . '</th>';
59
  }
60
+ echo '<th scope="col">' . esc_html__( 'Object cache', 'query-monitor' ) . '</th>';
 
 
61
  echo '</tr>';
62
  echo '</thead>';
63
 
110
  echo '</td>';
111
  }
112
 
113
+ echo '<td>';
114
  if ( isset( $cache_hit_percentage ) ) {
 
115
  echo esc_html( sprintf(
116
+ /* translators: 1: Cache hit rate percentage, 2: number of cache hits, 3: number of cache misses */
117
+ __( '%s%% hit rate (%s hits, %s misses)', 'query-monitor' ),
118
+ number_format_i18n( $cache_hit_percentage, 1 ),
119
+ number_format_i18n( $cache_data['stats']['cache_hits'], 0 ),
120
+ number_format_i18n( $cache_data['stats']['cache_misses'], 0 )
121
  ) );
122
+ if ( $cache_data['display_hit_rate_warning'] ) {
123
+ printf(
124
+ '<br><a href="%s">%s</a>',
125
+ 'https://github.com/johnbillion/query-monitor/wiki/Cache-Hit-Rate',
126
+ esc_html__( "Why is this value 100%?", 'query-monitor' )
127
+ );
128
+ }
129
  echo '<br><span class="qm-info">';
130
+ if ( $cache_data['ext_object_cache'] ) {
131
+ printf(
132
+ '<a href="%s">%s</a>',
133
+ admin_url( 'plugins.php?plugin_status=dropins' ),
134
+ esc_html__( 'External object cache in use', 'query-monitor' )
135
+ );
136
+ } else {
137
+ echo esc_html__( 'External object cache not in use', 'query-monitor' );
138
+ }
139
+ echo '</span>';
140
+ } else {
141
+ echo '<span class="qm-info">';
142
+ echo esc_html__( 'Object cache information is not available', 'query-monitor' );
143
  echo '</span>';
 
144
  }
145
+ echo '</td>';
146
 
147
  echo '</tr>';
148
  echo '</tbody>';
output/html/php_errors.php CHANGED
@@ -72,9 +72,9 @@ class QM_Output_Html_PHP_Errors extends QM_Output_Html {
72
  $component = $error->trace->get_component();
73
  $message = wp_strip_all_tags( $error->message );
74
 
75
- echo '<th scope="row">' . esc_html( $message ) . '</th>';
76
  echo '<td>' . esc_html( number_format_i18n( $error->calls ) ) . '</td>';
77
- echo '<td>';
78
  echo self::output_filename( $error->filename . ':' . $error->line, $error->file, $error->line ); // WPCS: XSS ok.
79
  echo '</td>';
80
 
@@ -91,7 +91,7 @@ class QM_Output_Html_PHP_Errors extends QM_Output_Html {
91
  } else if ( 0 === $i ) {
92
  $stack[] = self::output_filename( $item['display'], $error->file, $error->line );
93
  } else {
94
- $stack[] = $item['display'] . '<br>&nbsp;<span class="qm-info"><em>' . __( 'Unknown location', 'query-monitor' ) . '</em></span>';
95
  }
96
  }
97
 
72
  $component = $error->trace->get_component();
73
  $message = wp_strip_all_tags( $error->message );
74
 
75
+ echo '<th scope="row" class="qm-ltr">' . esc_html( $message ) . '</th>';
76
  echo '<td>' . esc_html( number_format_i18n( $error->calls ) ) . '</td>';
77
+ echo '<td class="qm-ltr">';
78
  echo self::output_filename( $error->filename . ':' . $error->line, $error->file, $error->line ); // WPCS: XSS ok.
79
  echo '</td>';
80
 
91
  } else if ( 0 === $i ) {
92
  $stack[] = self::output_filename( $item['display'], $error->file, $error->line );
93
  } else {
94
+ $stack[] = $item['display'] . '<br><span class="qm-info qm-supplemental"><em>' . __( 'Unknown location', 'query-monitor' ) . '</em></span>';
95
  }
96
  }
97
 
output/html/request.php CHANGED
@@ -59,7 +59,7 @@ class QM_Output_Html_Request extends QM_Output_Html {
59
 
60
  echo '<tr>';
61
  echo '<th>' . esc_html( $name ) . '</th>';
62
- echo '<td colspan="2">' . $value . '</td>'; // WPCS: XSS ok.
63
  echo '</tr>';
64
  }
65
 
@@ -79,17 +79,17 @@ class QM_Output_Html_Request extends QM_Output_Html {
79
  }
80
 
81
  if ( isset( $data['plugin_qvars'][$var] ) ) {
82
- echo '<td><span class="qm-current">' . esc_html( $var ) . '</span></td>';
83
  } else {
84
- echo '<td>' . esc_html( $var ) . '</td>';
85
  }
86
 
87
  if ( is_array( $value ) or is_object( $value ) ) {
88
- echo '<td><pre>';
89
  echo esc_html( print_r( $value, true ) );
90
  echo '</pre></td>';
91
  } else {
92
- echo '<td>' . esc_html( $value ) . '</td>';
93
  }
94
 
95
  echo '</tr>';
@@ -109,7 +109,7 @@ class QM_Output_Html_Request extends QM_Output_Html {
109
 
110
  echo '<tr>';
111
  echo '<th>' . esc_html__( 'Queried Object', 'query-monitor' ) . '</th>';
112
- echo '<td colspan="2" class="qm-has-inner qm-has-toggle"><div class="qm-toggler">';
113
 
114
  printf(
115
  '<div class="qm-inner-toggle">%1$s (%2$s) <button class="qm-toggle" data-on="+" data-off="-">+</button></div>',
@@ -141,7 +141,7 @@ class QM_Output_Html_Request extends QM_Output_Html {
141
  echo '<tr>';
142
  }
143
 
144
- echo '<td colspan="2" class="qm-has-inner qm-has-toggle"><div class="qm-toggler">';
145
 
146
  printf(
147
  '<div class="qm-inner-toggle">%1$s <button class="qm-toggle" data-on="+" data-off="-">+</button></div>',
59
 
60
  echo '<tr>';
61
  echo '<th>' . esc_html( $name ) . '</th>';
62
+ echo '<td colspan="2" class="qm-ltr">' . $value . '</td>'; // WPCS: XSS ok.
63
  echo '</tr>';
64
  }
65
 
79
  }
80
 
81
  if ( isset( $data['plugin_qvars'][$var] ) ) {
82
+ echo '<td class="qm-ltr"><span class="qm-current">' . esc_html( $var ) . '</span></td>';
83
  } else {
84
+ echo '<td class="qm-ltr">' . esc_html( $var ) . '</td>';
85
  }
86
 
87
  if ( is_array( $value ) or is_object( $value ) ) {
88
+ echo '<td class="qm-ltr"><pre>';
89
  echo esc_html( print_r( $value, true ) );
90
  echo '</pre></td>';
91
  } else {
92
+ echo '<td class="qm-ltr">' . esc_html( $value ) . '</td>';
93
  }
94
 
95
  echo '</tr>';
109
 
110
  echo '<tr>';
111
  echo '<th>' . esc_html__( 'Queried Object', 'query-monitor' ) . '</th>';
112
+ echo '<td colspan="2" class="qm-has-inner qm-has-toggle qm-ltr"><div class="qm-toggler">';
113
 
114
  printf(
115
  '<div class="qm-inner-toggle">%1$s (%2$s) <button class="qm-toggle" data-on="+" data-off="-">+</button></div>',
141
  echo '<tr>';
142
  }
143
 
144
+ echo '<td colspan="2" class="qm-has-inner qm-has-toggle qm-ltr"><div class="qm-toggler">';
145
 
146
  printf(
147
  '<div class="qm-inner-toggle">%1$s <button class="qm-toggle" data-on="+" data-off="-">+</button></div>',
output/html/rewrites.php CHANGED
@@ -45,8 +45,8 @@ class QM_Output_Html_Rewrites extends QM_Output_Html {
45
  $query = str_replace( 'index.php?', '', $query );
46
 
47
  echo '<tr>';
48
- echo '<td>' . esc_html( $rule ) . '</td>';
49
- echo '<td>';
50
  echo self::format_url( $query ); // WPCS: XSS ok.
51
  echo '</td>';
52
  echo '</tr>';
45
  $query = str_replace( 'index.php?', '', $query );
46
 
47
  echo '<tr>';
48
+ echo '<td class="qm-ltr">' . esc_html( $rule ) . '</td>';
49
+ echo '<td class="qm-ltr">';
50
  echo self::format_url( $query ); // WPCS: XSS ok.
51
  echo '</td>';
52
  echo '</tr>';
output/html/theme.php CHANGED
@@ -46,9 +46,9 @@ class QM_Output_Html_Theme extends QM_Output_Html {
46
  if ( ! empty( $data['template_path'] ) ) {
47
 
48
  if ( $data['is_child_theme'] ) {
49
- echo '<td>' . self::output_filename( $data['theme_template_file'], $data['template_path'] ) . '</td>'; // WPCS: XSS ok.
50
  } else {
51
- echo '<td>' . self::output_filename( $data['template_file'], $data['template_path'] ) . '</td>'; // WPCS: XSS ok.
52
  }
53
 
54
  } else {
@@ -61,7 +61,7 @@ class QM_Output_Html_Theme extends QM_Output_Html {
61
 
62
  echo '<tr>';
63
  echo '<th scope="row">' . esc_html__( 'Template Hierarchy', 'query-monitor' ) . '</th>';
64
- echo '<td><ul><li>' . implode( '</li><li>', array_map( 'esc_html', $data['template_hierarchy'] ) ) . '</li></ul></td>';
65
  echo '</tr>';
66
 
67
  }
@@ -77,7 +77,7 @@ class QM_Output_Html_Theme extends QM_Output_Html {
77
  $parts = $data['template_parts'];
78
  }
79
 
80
- echo '<td><ul>';
81
 
82
  foreach ( $parts as $filename => $display ) {
83
  echo '<li>' . self::output_filename( $display, $filename ) . '</li>'; // WPCS: XSS ok.
@@ -94,10 +94,10 @@ class QM_Output_Html_Theme extends QM_Output_Html {
94
  if ( ! empty( $data['timber_files'] ) ) {
95
  echo '<tr>';
96
  echo '<th scope="row">' . esc_html__( 'Timber Files', 'query-monitor' ) . '</th>';
97
- echo '<td><ul>';
98
 
99
  foreach ( $data['timber_files'] as $filename ) {
100
- echo '<li>' . self::output_filename( $filename ) . '</li>'; // WPCS: XSS ok.
101
  }
102
 
103
  echo '</ul></td>';
@@ -110,21 +110,21 @@ class QM_Output_Html_Theme extends QM_Output_Html {
110
  } else {
111
  echo '<th scope="row">' . esc_html__( 'Theme', 'query-monitor' ) . '</th>';
112
  }
113
- echo '<td>' . esc_html( $data['stylesheet'] ) . '</td>';
114
  echo '</tr>';
115
 
116
  if ( $data['is_child_theme'] ) {
117
  echo '<tr>';
118
  echo '<th scope="row">' . esc_html__( 'Parent Theme', 'query-monitor' ) . '</th>';
119
- echo '<td>' . esc_html( $data['template'] ) . '</td>';
120
  echo '</tr>';
121
  }
122
 
123
- if ( !empty( $data['body_class'] ) ) {
124
 
125
  echo '<tr>';
126
  echo '<th scope="row">' . esc_html__( 'Body Classes', 'query-monitor' ) . '</th>';
127
- echo '<td><ul>';
128
 
129
  foreach ( $data['body_class'] as $class ) {
130
  echo '<li>' . esc_html( $class ) . '</li>';
46
  if ( ! empty( $data['template_path'] ) ) {
47
 
48
  if ( $data['is_child_theme'] ) {
49
+ echo '<td class="qm-ltr">' . self::output_filename( $data['theme_template_file'], $data['template_path'] ) . '</td>'; // WPCS: XSS ok.
50
  } else {
51
+ echo '<td class="qm-ltr">' . self::output_filename( $data['template_file'], $data['template_path'] ) . '</td>'; // WPCS: XSS ok.
52
  }
53
 
54
  } else {
61
 
62
  echo '<tr>';
63
  echo '<th scope="row">' . esc_html__( 'Template Hierarchy', 'query-monitor' ) . '</th>';
64
+ echo '<td class="qm-ltr"><ul><li>' . implode( '</li><li>', array_map( 'esc_html', $data['template_hierarchy'] ) ) . '</li></ul></td>';
65
  echo '</tr>';
66
 
67
  }
77
  $parts = $data['template_parts'];
78
  }
79
 
80
+ echo '<td class="qm-ltr"><ul>';
81
 
82
  foreach ( $parts as $filename => $display ) {
83
  echo '<li>' . self::output_filename( $display, $filename ) . '</li>'; // WPCS: XSS ok.
94
  if ( ! empty( $data['timber_files'] ) ) {
95
  echo '<tr>';
96
  echo '<th scope="row">' . esc_html__( 'Timber Files', 'query-monitor' ) . '</th>';
97
+ echo '<td class="qm-ltr"><ul>';
98
 
99
  foreach ( $data['timber_files'] as $filename ) {
100
+ echo '<li>' . esc_html( $filename ) . '</li>'; // WPCS: XSS ok.
101
  }
102
 
103
  echo '</ul></td>';
110
  } else {
111
  echo '<th scope="row">' . esc_html__( 'Theme', 'query-monitor' ) . '</th>';
112
  }
113
+ echo '<td class="qm-ltr">' . esc_html( $data['stylesheet'] ) . '</td>';
114
  echo '</tr>';
115
 
116
  if ( $data['is_child_theme'] ) {
117
  echo '<tr>';
118
  echo '<th scope="row">' . esc_html__( 'Parent Theme', 'query-monitor' ) . '</th>';
119
+ echo '<td class="qm-ltr">' . esc_html( $data['template'] ) . '</td>';
120
  echo '</tr>';
121
  }
122
 
123
+ if ( ! empty( $data['body_class'] ) ) {
124
 
125
  echo '<tr>';
126
  echo '<th scope="row">' . esc_html__( 'Body Classes', 'query-monitor' ) . '</th>';
127
+ echo '<td class="qm-ltr"><ul>';
128
 
129
  foreach ( $data['body_class'] as $class ) {
130
  echo '<li>' . esc_html( $class ) . '</li>';
output/html/transients.php CHANGED
@@ -58,12 +58,12 @@ class QM_Output_Html_Transients extends QM_Output_Html {
58
 
59
  echo '<tr>';
60
  printf(
61
- '<td>%s</td>',
62
  esc_html( $transient )
63
  );
64
  if ( is_multisite() ) {
65
  printf(
66
- '<td>%s</td>',
67
  esc_html( $row['type'] )
68
  );
69
  }
58
 
59
  echo '<tr>';
60
  printf(
61
+ '<td class="qm-ltr">%s</td>',
62
  esc_html( $transient )
63
  );
64
  if ( is_multisite() ) {
65
  printf(
66
+ '<td class="qm-ltr">%s</td>',
67
  esc_html( $row['type'] )
68
  );
69
  }
query-monitor.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Query Monitor
4
  Description: Monitoring of database queries, hooks, conditionals and more.
5
- Version: 2.13.2
6
  Plugin URI: https://github.com/johnbillion/query-monitor
7
  Author: John Blackbourn
8
  Author URI: https://johnblackbourn.com/
@@ -10,7 +10,7 @@ Text Domain: query-monitor
10
  Domain Path: /languages/
11
  License: GPL v2 or later
12
 
13
- Copyright 2009-2016 John Blackbourn
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
2
  /*
3
  Plugin Name: Query Monitor
4
  Description: Monitoring of database queries, hooks, conditionals and more.
5
+ Version: 2.13.3
6
  Plugin URI: https://github.com/johnbillion/query-monitor
7
  Author: John Blackbourn
8
  Author URI: https://johnblackbourn.com/
10
  Domain Path: /languages/
11
  License: GPL v2 or later
12
 
13
+ Copyright 2009-2017 John Blackbourn
14
 
15
  This program is free software; you can redistribute it and/or modify
16
  it under the terms of the GNU General Public License as published by
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.7
6
- Stable tag: 2.13.2
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.7
6
+ Stable tag: 2.13.3
7
  License: GPLv2 or later
8
 
9
  View debugging and performance information on database queries, hooks, conditionals, HTTP requests, redirects and more.