Query Monitor - Version 3.3.6

Version Description

Download this release

Release Info

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

Code changes from version 3.3.5 to 3.3.6

assets/query-monitor-dark.css CHANGED
@@ -3,13 +3,6 @@
3
  *
4
  * @package query-monitor
5
  */
6
- /**
7
- * Dark Mode Colours
8
- */
9
- /**
10
- * The colours below are loosely based on the WordPress branding colours.
11
- * https://make.wordpress.org/design/handbook/design-guide/foundations/colors/
12
- */
13
  #wpadminbar .quicklinks .menupop ul li.qm-true > a {
14
  color: #8c8 !important;
15
  }
@@ -305,17 +298,22 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
305
  }
306
  #query-monitor-main #qm-title .qm-button-container-settings .dashicons {
307
  font-size: 17px !important;
308
- margin: 3px 0 2px !important;
309
  }
310
  #query-monitor-main #qm-title .qm-button-container-position .dashicons {
311
  font-size: 15px !important;
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;
319
  }
320
  @media screen and (max-width: 960px) {
321
  #query-monitor-main #qm-title .qm-button-container-position {
3
  *
4
  * @package query-monitor
5
  */
 
 
 
 
 
 
 
6
  #wpadminbar .quicklinks .menupop ul li.qm-true > a {
7
  color: #8c8 !important;
8
  }
298
  }
299
  #query-monitor-main #qm-title .qm-button-container-settings .dashicons {
300
  font-size: 17px !important;
301
+ margin: 4px 0 2px !important;
302
  }
303
  #query-monitor-main #qm-title .qm-button-container-position .dashicons {
304
  font-size: 15px !important;
305
+ margin: 2px -1px 3px 4px !important;
306
+ transform: scaleX(-1) rotate(90deg) !important;
307
+ }
308
+ #query-monitor-main.qm-show-right #qm-title .qm-button-container-position .dashicons {
309
+ margin: 4px 1px 0px 1px !important;
310
+ transform: none !important;
311
  }
312
  #query-monitor-main #qm-title .qm-button-container-close {
313
  margin-right: 10px !important;
314
  }
315
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
316
+ margin: 3px 0 3px !important;
317
  }
318
  @media screen and (max-width: 960px) {
319
  #query-monitor-main #qm-title .qm-button-container-position {
assets/query-monitor.css CHANGED
@@ -298,17 +298,22 @@ body.admin-color-light #wp-admin-bar-query-monitor:not(.qm-all-clear):not(:hover
298
  }
299
  #query-monitor-main #qm-title .qm-button-container-settings .dashicons {
300
  font-size: 17px !important;
301
- margin: 3px 0 2px !important;
302
  }
303
  #query-monitor-main #qm-title .qm-button-container-position .dashicons {
304
  font-size: 15px !important;
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;
312
  }
313
  @media screen and (max-width: 960px) {
314
  #query-monitor-main #qm-title .qm-button-container-position {
298
  }
299
  #query-monitor-main #qm-title .qm-button-container-settings .dashicons {
300
  font-size: 17px !important;
301
+ margin: 4px 0 2px !important;
302
  }
303
  #query-monitor-main #qm-title .qm-button-container-position .dashicons {
304
  font-size: 15px !important;
305
+ margin: 2px -1px 3px 4px !important;
306
+ transform: scaleX(-1) rotate(90deg) !important;
307
+ }
308
+ #query-monitor-main.qm-show-right #qm-title .qm-button-container-position .dashicons {
309
+ margin: 4px 1px 0px 1px !important;
310
+ transform: none !important;
311
  }
312
  #query-monitor-main #qm-title .qm-button-container-close {
313
  margin-right: 10px !important;
314
  }
315
  #query-monitor-main #qm-title .qm-button-container-close .dashicons {
316
+ margin: 3px 0 3px !important;
317
  }
318
  @media screen and (max-width: 960px) {
319
  #query-monitor-main #qm-title .qm-button-container-position {
classes/Dispatcher.php CHANGED
@@ -26,7 +26,7 @@ abstract class QM_Dispatcher {
26
  $e = error_get_last();
27
 
28
  # Don't dispatch if a fatal has occurred:
29
- if ( ! empty( $e ) && ( $e['type'] & ( E_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR ) ) ) {
30
  return false;
31
  }
32
 
26
  $e = error_get_last();
27
 
28
  # Don't dispatch if a fatal has occurred:
29
+ if ( ! empty( $e ) && ( $e['type'] & QM_ERROR_FATALS ) ) {
30
  return false;
31
  }
32
 
collectors/php_errors.php CHANGED
@@ -5,6 +5,8 @@
5
  * @package query-monitor
6
  */
7
 
 
 
8
  class QM_Collector_PHP_Errors extends QM_Collector {
9
 
10
  public $id = 'php_errors';
@@ -24,7 +26,7 @@ class QM_Collector_PHP_Errors extends QM_Collector {
24
  }
25
 
26
  parent::__construct();
27
- set_error_handler( array( $this, 'error_handler' ) );
28
  register_shutdown_function( array( $this, 'shutdown_handler' ) );
29
 
30
  $this->error_reporting = error_reporting();
@@ -126,12 +128,12 @@ class QM_Collector_PHP_Errors extends QM_Collector {
126
  }
127
 
128
  /**
129
- * Filters the PHP error handler return value. This can be used to control whether or not additional error
130
- * handlers are called after Query Monitor's.
131
  *
132
  * @since 2.7.0
133
  *
134
- * @param bool $return_value Error handler return value. Default true.
135
  */
136
  return apply_filters( 'qm/collect/php_errors_return_value', false );
137
 
@@ -145,38 +147,23 @@ class QM_Collector_PHP_Errors extends QM_Collector {
145
  return;
146
  }
147
 
148
- if ( empty( $e ) || ! ( $e['type'] & ( E_ERROR | E_PARSE | E_COMPILE_ERROR | E_COMPILE_WARNING | E_USER_ERROR | E_RECOVERABLE_ERROR ) ) ) {
149
  return;
150
  }
151
 
152
  if ( $e['type'] & E_RECOVERABLE_ERROR ) {
153
  $error = 'Catchable fatal error';
154
- } elseif ( $e['type'] & E_COMPILE_WARNING ) {
155
- $error = 'Warning';
156
  } else {
157
  $error = 'Fatal error';
158
  }
159
 
160
- if ( function_exists( 'xdebug_print_function_stack' ) ) {
161
-
162
- xdebug_print_function_stack( sprintf( '%1$s: %2$s in %3$s on line %4$d. Output triggered ',
163
- $error,
164
- $e['message'],
165
- $e['file'],
166
- $e['line']
167
- ) );
168
-
169
- } else {
170
-
171
- printf( // WPCS: XSS ok.
172
- '<br /><b>%1$s</b>: %2$s in <b>%3$s</b> on line <b>%4$d</b><br />',
173
- htmlentities( $error ),
174
- htmlentities( $e['message'] ),
175
- htmlentities( $e['file'] ),
176
- intval( $e['line'] )
177
- );
178
-
179
- }
180
 
181
  }
182
 
5
  * @package query-monitor
6
  */
7
 
8
+ define( 'QM_ERROR_FATALS', E_ERROR | E_PARSE | E_COMPILE_ERROR | E_USER_ERROR | E_RECOVERABLE_ERROR );
9
+
10
  class QM_Collector_PHP_Errors extends QM_Collector {
11
 
12
  public $id = 'php_errors';
26
  }
27
 
28
  parent::__construct();
29
+ set_error_handler( array( $this, 'error_handler' ), ( E_ALL ^ QM_ERROR_FATALS ) );
30
  register_shutdown_function( array( $this, 'shutdown_handler' ) );
31
 
32
  $this->error_reporting = error_reporting();
128
  }
129
 
130
  /**
131
+ * Filters the PHP error handler return value. This can be used to control whether or not the default error
132
+ * handler is called after Query Monitor's.
133
  *
134
  * @since 2.7.0
135
  *
136
+ * @param bool $return_value Error handler return value. Default false.
137
  */
138
  return apply_filters( 'qm/collect/php_errors_return_value', false );
139
 
147
  return;
148
  }
149
 
150
+ if ( empty( $e ) || ! ( $e['type'] & QM_ERROR_FATALS ) ) {
151
  return;
152
  }
153
 
154
  if ( $e['type'] & E_RECOVERABLE_ERROR ) {
155
  $error = 'Catchable fatal error';
 
 
156
  } else {
157
  $error = 'Fatal error';
158
  }
159
 
160
+ printf( // WPCS: XSS ok.
161
+ '<br><b>%1$s</b>: %2$s in <b>%3$s</b> on line <b>%4$d</b><br>',
162
+ htmlentities( $error ),
163
+ nl2br( htmlentities( $e['message'] ), false ),
164
+ htmlentities( $e['file'] ),
165
+ intval( $e['line'] )
166
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
  }
169
 
composer.json CHANGED
@@ -15,24 +15,6 @@
15
  "forum": "https://wordpress.org/support/plugin/query-monitor",
16
  "source": "https://github.com/johnbillion/query-monitor"
17
  },
18
- "repositories": [
19
- {
20
- "type": "package",
21
- "package": {
22
- "name": "danieltj27/dark-mode",
23
- "version": "3.2",
24
- "source": {
25
- "type" : "git",
26
- "url" : "git://github.com/danieltj27/Dark-Mode.git",
27
- "reference" : "3.2"
28
- },
29
- "dist": {
30
- "url": "https://github.com/danieltj27/Dark-Mode/archive/31e1407ef72af69bcd5d94cc3c502163547d4898.zip",
31
- "type": "zip"
32
- }
33
- }
34
- }
35
- ],
36
  "config": {
37
  "preferred-install": "dist"
38
  },
@@ -47,8 +29,7 @@
47
  "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
48
  "squizlabs/php_codesniffer": "^3.2",
49
  "phpcompatibility/phpcompatibility-wp": "^2.0",
50
- "danieltj27/dark-mode": "3.2",
51
- "wp-coding-standards/wpcs": "^2",
52
  "wp-phpunit/wp-phpunit": "*",
53
  "roots/wordpress": "*",
54
  "vlucas/phpdotenv": "^3",
15
  "forum": "https://wordpress.org/support/plugin/query-monitor",
16
  "source": "https://github.com/johnbillion/query-monitor"
17
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  "config": {
19
  "preferred-install": "dist"
20
  },
29
  "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
30
  "squizlabs/php_codesniffer": "^3.2",
31
  "phpcompatibility/phpcompatibility-wp": "^2.0",
32
+ "wp-coding-standards/wpcs": "~2.0.0",
 
33
  "wp-phpunit/wp-phpunit": "*",
34
  "roots/wordpress": "*",
35
  "vlucas/phpdotenv": "^3",
output/html/languages.php CHANGED
@@ -65,16 +65,16 @@ class QM_Output_Html_Languages extends QM_Output_Html {
65
  }
66
  echo '</td>';
67
 
 
 
68
  if ( $mofile['found'] ) {
69
- echo '<td class="qm-nowrap">';
70
  echo esc_html( size_format( $mofile['found'] ) );
71
- echo '</td>';
72
  } else {
73
- echo '<td>';
74
  echo esc_html__( 'Not Found', 'query-monitor' );
75
- echo '</td>';
76
  }
77
 
 
 
78
  echo '</tr>';
79
  $first = false;
80
  }
65
  }
66
  echo '</td>';
67
 
68
+ echo '<td class="qm-nowrap">';
69
+
70
  if ( $mofile['found'] ) {
 
71
  echo esc_html( size_format( $mofile['found'] ) );
 
72
  } else {
 
73
  echo esc_html__( 'Not Found', 'query-monitor' );
 
74
  }
75
 
76
+ echo '</td>';
77
+
78
  echo '</tr>';
79
  $first = false;
80
  }
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.5
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.6
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.2
6
- Stable tag: 3.3.5
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9
 
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.3.6
7
  License: GPLv2 or later
8
  Requires PHP: 5.3
9