Version Description
Download this release
Release Info
Developer | johnbillion |
Plugin | Query Monitor |
Version | 3.3.2 |
Comparing to | |
See all releases |
Code changes from version 3.3.1 to 3.3.2
- collectors/assets.php +13 -6
- collectors/cache.php +1 -6
- composer.json +3 -3
- output/headers/overview.php +1 -1
- output/headers/php_errors.php +1 -1
- output/headers/redirects.php +1 -1
- output/html/admin.php +1 -1
- output/html/assets.php +2 -2
- output/html/assets_scripts.php +1 -1
- output/html/assets_styles.php +1 -1
- output/html/block_editor.php +1 -1
- output/html/caps.php +1 -1
- output/html/conditionals.php +1 -1
- output/html/db_callers.php +1 -1
- output/html/db_components.php +1 -1
- output/html/db_dupes.php +1 -1
- output/html/db_queries.php +1 -1
- output/html/environment.php +1 -1
- output/html/hooks.php +1 -1
- output/html/http.php +1 -1
- output/html/languages.php +1 -1
- output/html/logger.php +1 -1
- output/html/overview.php +34 -58
- output/html/php_errors.php +1 -1
- output/html/request.php +1 -1
- output/html/theme.php +1 -1
- output/html/timing.php +1 -1
- output/html/transients.php +1 -1
- query-monitor.php +1 -1
- readme.txt +1 -1
collectors/assets.php
CHANGED
@@ -41,8 +41,9 @@ abstract class QM_Collector_Assets extends QM_Collector {
|
|
41 |
return;
|
42 |
}
|
43 |
|
44 |
-
$this->data['is_ssl']
|
45 |
-
$this->data['host']
|
|
|
46 |
|
47 |
$home_url = home_url();
|
48 |
$positions = array(
|
@@ -111,7 +112,7 @@ abstract class QM_Collector_Assets extends QM_Collector {
|
|
111 |
$dependents = $this->get_dependents( $dependency, $raw );
|
112 |
$all_dependents = array_merge( $all_dependents, $dependents );
|
113 |
|
114 |
-
list( $host, $source, $local ) = $this->get_dependency_data( $dependency
|
115 |
|
116 |
if ( empty( $dependency->ver ) ) {
|
117 |
$ver = '';
|
@@ -193,13 +194,19 @@ abstract class QM_Collector_Assets extends QM_Collector {
|
|
193 |
return $dependents;
|
194 |
}
|
195 |
|
196 |
-
public function get_dependency_data( _WP_Dependency $dependency
|
197 |
$data = $this->get_data();
|
198 |
$loader = rtrim( $this->get_dependency_type(), 's' );
|
199 |
$src = $dependency->src;
|
200 |
|
201 |
-
if (
|
202 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
203 |
}
|
204 |
|
205 |
/** This filter is documented in wp-includes/class.wp-scripts.php */
|
41 |
return;
|
42 |
}
|
43 |
|
44 |
+
$this->data['is_ssl'] = is_ssl();
|
45 |
+
$this->data['host'] = wp_unslash( $_SERVER['HTTP_HOST'] );
|
46 |
+
$this->data['default_version'] = get_bloginfo( 'version' );
|
47 |
|
48 |
$home_url = home_url();
|
49 |
$positions = array(
|
112 |
$dependents = $this->get_dependents( $dependency, $raw );
|
113 |
$all_dependents = array_merge( $all_dependents, $dependents );
|
114 |
|
115 |
+
list( $host, $source, $local ) = $this->get_dependency_data( $dependency );
|
116 |
|
117 |
if ( empty( $dependency->ver ) ) {
|
118 |
$ver = '';
|
194 |
return $dependents;
|
195 |
}
|
196 |
|
197 |
+
public function get_dependency_data( _WP_Dependency $dependency ) {
|
198 |
$data = $this->get_data();
|
199 |
$loader = rtrim( $this->get_dependency_type(), 's' );
|
200 |
$src = $dependency->src;
|
201 |
|
202 |
+
if ( null === $dependency->ver ) {
|
203 |
+
$ver = '';
|
204 |
+
} else {
|
205 |
+
$ver = $dependency->ver ? $dependency->ver : $this->data['default_version'];
|
206 |
+
}
|
207 |
+
|
208 |
+
if ( ! empty( $src ) && ! empty( $ver ) ) {
|
209 |
+
$src = add_query_arg( 'ver', $ver, $src );
|
210 |
}
|
211 |
|
212 |
/** This filter is documented in wp-includes/class.wp-scripts.php */
|
collectors/cache.php
CHANGED
@@ -88,12 +88,7 @@ class QM_Collector_Cache extends QM_Collector {
|
|
88 |
$this->data['opcode_cache_extensions'] = array();
|
89 |
}
|
90 |
|
91 |
-
$this->data['has_opcode_cache'] = false;
|
92 |
-
|
93 |
-
if ( array_filter( $this->data['opcode_cache_extensions'] ) && function_exists( 'opcache_get_status' ) ) {
|
94 |
-
$status = opcache_get_status();
|
95 |
-
$this->data['has_opcode_cache'] = $status && ! empty( $status['opcache_enabled'] );
|
96 |
-
}
|
97 |
}
|
98 |
|
99 |
}
|
88 |
$this->data['opcode_cache_extensions'] = array();
|
89 |
}
|
90 |
|
91 |
+
$this->data['has_opcode_cache'] = array_filter( $this->data['opcode_cache_extensions'] ) ? true : false;
|
|
|
|
|
|
|
|
|
|
|
92 |
}
|
93 |
|
94 |
}
|
composer.json
CHANGED
@@ -19,9 +19,9 @@
|
|
19 |
{
|
20 |
"type": "package",
|
21 |
"package": {
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
"type" : "git",
|
26 |
"url" : "git://github.com/danieltj27/Dark-Mode.git",
|
27 |
"reference" : "3.2"
|
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"
|
output/headers/overview.php
CHANGED
@@ -41,7 +41,7 @@ class QM_Output_Headers_Overview extends QM_Output_Headers {
|
|
41 |
}
|
42 |
|
43 |
function register_qm_output_headers_overview( array $output, QM_Collectors $collectors ) {
|
44 |
-
$collector =
|
45 |
if ( $collector ) {
|
46 |
$output['overview'] = new QM_Output_Headers_Overview( $collector );
|
47 |
}
|
41 |
}
|
42 |
|
43 |
function register_qm_output_headers_overview( array $output, QM_Collectors $collectors ) {
|
44 |
+
$collector = QM_Collectors::get( 'overview' );
|
45 |
if ( $collector ) {
|
46 |
$output['overview'] = new QM_Output_Headers_Overview( $collector );
|
47 |
}
|
output/headers/php_errors.php
CHANGED
@@ -53,7 +53,7 @@ class QM_Output_Headers_PHP_Errors extends QM_Output_Headers {
|
|
53 |
}
|
54 |
|
55 |
function register_qm_output_headers_php_errors( array $output, QM_Collectors $collectors ) {
|
56 |
-
$collector =
|
57 |
if ( $collector ) {
|
58 |
$output['php_errors'] = new QM_Output_Headers_PHP_Errors( $collector );
|
59 |
}
|
53 |
}
|
54 |
|
55 |
function register_qm_output_headers_php_errors( array $output, QM_Collectors $collectors ) {
|
56 |
+
$collector = QM_Collectors::get( 'php_errors' );
|
57 |
if ( $collector ) {
|
58 |
$output['php_errors'] = new QM_Output_Headers_PHP_Errors( $collector );
|
59 |
}
|
output/headers/redirects.php
CHANGED
@@ -23,7 +23,7 @@ class QM_Output_Headers_Redirects extends QM_Output_Headers {
|
|
23 |
}
|
24 |
|
25 |
function register_qm_output_headers_redirects( array $output, QM_Collectors $collectors ) {
|
26 |
-
$collector =
|
27 |
if ( $collector ) {
|
28 |
$output['redirects'] = new QM_Output_Headers_Redirects( $collector );
|
29 |
}
|
23 |
}
|
24 |
|
25 |
function register_qm_output_headers_redirects( array $output, QM_Collectors $collectors ) {
|
26 |
+
$collector = QM_Collectors::get( 'redirects' );
|
27 |
if ( $collector ) {
|
28 |
$output['redirects'] = new QM_Output_Headers_Redirects( $collector );
|
29 |
}
|
output/html/admin.php
CHANGED
@@ -78,7 +78,7 @@ function register_qm_output_html_admin( array $output, QM_Collectors $collectors
|
|
78 |
if ( ! is_admin() ) {
|
79 |
return $output;
|
80 |
}
|
81 |
-
$collector =
|
82 |
if ( $collector ) {
|
83 |
$output['response'] = new QM_Output_Html_Admin( $collector );
|
84 |
}
|
78 |
if ( ! is_admin() ) {
|
79 |
return $output;
|
80 |
}
|
81 |
+
$collector = QM_Collectors::get( 'response' );
|
82 |
if ( $collector ) {
|
83 |
$output['response'] = new QM_Output_Html_Admin( $collector );
|
84 |
}
|
output/html/assets.php
CHANGED
@@ -132,7 +132,7 @@ abstract class QM_Output_Html_Assets extends QM_Output_Html {
|
|
132 |
printf(
|
133 |
'<span class="qm-warn"><span class="dashicons dashicons-warning" aria-hidden="true"></span>%1$s:</span><br><a href="%2$s" class="qm-link">%2$s</a>',
|
134 |
esc_html( $asset['source']->get_error_message() ),
|
135 |
-
|
136 |
);
|
137 |
} else {
|
138 |
printf(
|
@@ -143,7 +143,7 @@ abstract class QM_Output_Html_Assets extends QM_Output_Html {
|
|
143 |
} elseif ( ! empty( $asset['source'] ) ) {
|
144 |
printf(
|
145 |
'<a href="%s" class="qm-link">%s</a>',
|
146 |
-
|
147 |
esc_html( $asset['display'] )
|
148 |
);
|
149 |
}
|
132 |
printf(
|
133 |
'<span class="qm-warn"><span class="dashicons dashicons-warning" aria-hidden="true"></span>%1$s:</span><br><a href="%2$s" class="qm-link">%2$s</a>',
|
134 |
esc_html( $asset['source']->get_error_message() ),
|
135 |
+
esc_url( $error_data['src'] )
|
136 |
);
|
137 |
} else {
|
138 |
printf(
|
143 |
} elseif ( ! empty( $asset['source'] ) ) {
|
144 |
printf(
|
145 |
'<a href="%s" class="qm-link">%s</a>',
|
146 |
+
esc_url( $asset['source'] ),
|
147 |
esc_html( $asset['display'] )
|
148 |
);
|
149 |
}
|
output/html/assets_scripts.php
CHANGED
@@ -18,7 +18,7 @@ class QM_Output_Html_Assets_Scripts extends QM_Output_Html_Assets {
|
|
18 |
}
|
19 |
|
20 |
function register_qm_output_html_assets_scripts( array $output, QM_Collectors $collectors ) {
|
21 |
-
$collector =
|
22 |
if ( $collector ) {
|
23 |
$output['assets_scripts'] = new QM_Output_Html_Assets_Scripts( $collector );
|
24 |
}
|
18 |
}
|
19 |
|
20 |
function register_qm_output_html_assets_scripts( array $output, QM_Collectors $collectors ) {
|
21 |
+
$collector = QM_Collectors::get( 'assets_scripts' );
|
22 |
if ( $collector ) {
|
23 |
$output['assets_scripts'] = new QM_Output_Html_Assets_Scripts( $collector );
|
24 |
}
|
output/html/assets_styles.php
CHANGED
@@ -18,7 +18,7 @@ class QM_Output_Html_Assets_Styles extends QM_Output_Html_Assets {
|
|
18 |
}
|
19 |
|
20 |
function register_qm_output_html_assets_styles( array $output, QM_Collectors $collectors ) {
|
21 |
-
$collector =
|
22 |
if ( $collector ) {
|
23 |
$output['assets_styles'] = new QM_Output_Html_Assets_Styles( $collector );
|
24 |
}
|
18 |
}
|
19 |
|
20 |
function register_qm_output_html_assets_styles( array $output, QM_Collectors $collectors ) {
|
21 |
+
$collector = QM_Collectors::get( 'assets_styles' );
|
22 |
if ( $collector ) {
|
23 |
$output['assets_styles'] = new QM_Output_Html_Assets_Styles( $collector );
|
24 |
}
|
output/html/block_editor.php
CHANGED
@@ -261,7 +261,7 @@ class QM_Output_Html_Block_Editor extends QM_Output_Html {
|
|
261 |
}
|
262 |
|
263 |
function register_qm_output_html_block_editor( array $output, QM_Collectors $collectors ) {
|
264 |
-
$collector =
|
265 |
if ( $collector ) {
|
266 |
$output['block_editor'] = new QM_Output_Html_Block_Editor( $collector );
|
267 |
}
|
261 |
}
|
262 |
|
263 |
function register_qm_output_html_block_editor( array $output, QM_Collectors $collectors ) {
|
264 |
+
$collector = QM_Collectors::get( 'block_editor' );
|
265 |
if ( $collector ) {
|
266 |
$output['block_editor'] = new QM_Output_Html_Block_Editor( $collector );
|
267 |
}
|
output/html/caps.php
CHANGED
@@ -218,7 +218,7 @@ class QM_Output_Html_Caps extends QM_Output_Html {
|
|
218 |
}
|
219 |
|
220 |
function register_qm_output_html_caps( array $output, QM_Collectors $collectors ) {
|
221 |
-
$collector =
|
222 |
if ( $collector ) {
|
223 |
$output['caps'] = new QM_Output_Html_Caps( $collector );
|
224 |
}
|
218 |
}
|
219 |
|
220 |
function register_qm_output_html_caps( array $output, QM_Collectors $collectors ) {
|
221 |
+
$collector = QM_Collectors::get( 'caps' );
|
222 |
if ( $collector ) {
|
223 |
$output['caps'] = new QM_Output_Html_Caps( $collector );
|
224 |
}
|
output/html/conditionals.php
CHANGED
@@ -86,7 +86,7 @@ class QM_Output_Html_Conditionals extends QM_Output_Html {
|
|
86 |
}
|
87 |
|
88 |
function register_qm_output_html_conditionals( array $output, QM_Collectors $collectors ) {
|
89 |
-
$collector =
|
90 |
if ( $collector ) {
|
91 |
$output['conditionals'] = new QM_Output_Html_Conditionals( $collector );
|
92 |
}
|
86 |
}
|
87 |
|
88 |
function register_qm_output_html_conditionals( array $output, QM_Collectors $collectors ) {
|
89 |
+
$collector = QM_Collectors::get( 'conditionals' );
|
90 |
if ( $collector ) {
|
91 |
$output['conditionals'] = new QM_Output_Html_Conditionals( $collector );
|
92 |
}
|
output/html/db_callers.php
CHANGED
@@ -110,7 +110,7 @@ class QM_Output_Html_DB_Callers extends QM_Output_Html {
|
|
110 |
}
|
111 |
|
112 |
function register_qm_output_html_db_callers( array $output, QM_Collectors $collectors ) {
|
113 |
-
$collector =
|
114 |
if ( $collector ) {
|
115 |
$output['db_callers'] = new QM_Output_Html_DB_Callers( $collector );
|
116 |
}
|
110 |
}
|
111 |
|
112 |
function register_qm_output_html_db_callers( array $output, QM_Collectors $collectors ) {
|
113 |
+
$collector = QM_Collectors::get( 'db_callers' );
|
114 |
if ( $collector ) {
|
115 |
$output['db_callers'] = new QM_Output_Html_DB_Callers( $collector );
|
116 |
}
|
output/html/db_components.php
CHANGED
@@ -107,7 +107,7 @@ class QM_Output_Html_DB_Components extends QM_Output_Html {
|
|
107 |
}
|
108 |
|
109 |
function register_qm_output_html_db_components( array $output, QM_Collectors $collectors ) {
|
110 |
-
$collector =
|
111 |
if ( $collector ) {
|
112 |
$output['db_components'] = new QM_Output_Html_DB_Components( $collector );
|
113 |
}
|
107 |
}
|
108 |
|
109 |
function register_qm_output_html_db_components( array $output, QM_Collectors $collectors ) {
|
110 |
+
$collector = QM_Collectors::get( 'db_components' );
|
111 |
if ( $collector ) {
|
112 |
$output['db_components'] = new QM_Output_Html_DB_Components( $collector );
|
113 |
}
|
output/html/db_dupes.php
CHANGED
@@ -139,7 +139,7 @@ class QM_Output_Html_DB_Dupes extends QM_Output_Html {
|
|
139 |
}
|
140 |
|
141 |
function register_qm_output_html_db_dupes( array $output, QM_Collectors $collectors ) {
|
142 |
-
$collector =
|
143 |
if ( $collector ) {
|
144 |
$output['db_dupes'] = new QM_Output_Html_DB_Dupes( $collector );
|
145 |
}
|
139 |
}
|
140 |
|
141 |
function register_qm_output_html_db_dupes( array $output, QM_Collectors $collectors ) {
|
142 |
+
$collector = QM_Collectors::get( 'db_dupes' );
|
143 |
if ( $collector ) {
|
144 |
$output['db_dupes'] = new QM_Output_Html_DB_Dupes( $collector );
|
145 |
}
|
output/html/db_queries.php
CHANGED
@@ -551,7 +551,7 @@ class QM_Output_Html_DB_Queries extends QM_Output_Html {
|
|
551 |
}
|
552 |
|
553 |
function register_qm_output_html_db_queries( array $output, QM_Collectors $collectors ) {
|
554 |
-
$collector =
|
555 |
if ( $collector ) {
|
556 |
$output['db_queries'] = new QM_Output_Html_DB_Queries( $collector );
|
557 |
}
|
551 |
}
|
552 |
|
553 |
function register_qm_output_html_db_queries( array $output, QM_Collectors $collectors ) {
|
554 |
+
$collector = QM_Collectors::get( 'db_queries' );
|
555 |
if ( $collector ) {
|
556 |
$output['db_queries'] = new QM_Output_Html_DB_Queries( $collector );
|
557 |
}
|
output/html/environment.php
CHANGED
@@ -287,7 +287,7 @@ class QM_Output_Html_Environment extends QM_Output_Html {
|
|
287 |
}
|
288 |
|
289 |
function register_qm_output_html_environment( array $output, QM_Collectors $collectors ) {
|
290 |
-
$collector =
|
291 |
if ( $collector ) {
|
292 |
$output['environment'] = new QM_Output_Html_Environment( $collector );
|
293 |
}
|
287 |
}
|
288 |
|
289 |
function register_qm_output_html_environment( array $output, QM_Collectors $collectors ) {
|
290 |
+
$collector = QM_Collectors::get( 'environment' );
|
291 |
if ( $collector ) {
|
292 |
$output['environment'] = new QM_Output_Html_Environment( $collector );
|
293 |
}
|
output/html/hooks.php
CHANGED
@@ -181,7 +181,7 @@ class QM_Output_Html_Hooks extends QM_Output_Html {
|
|
181 |
}
|
182 |
|
183 |
function register_qm_output_html_hooks( array $output, QM_Collectors $collectors ) {
|
184 |
-
$collector =
|
185 |
if ( $collector ) {
|
186 |
$output['hooks'] = new QM_Output_Html_Hooks( $collector );
|
187 |
}
|
181 |
}
|
182 |
|
183 |
function register_qm_output_html_hooks( array $output, QM_Collectors $collectors ) {
|
184 |
+
$collector = QM_Collectors::get( 'hooks' );
|
185 |
if ( $collector ) {
|
186 |
$output['hooks'] = new QM_Output_Html_Hooks( $collector );
|
187 |
}
|
output/html/http.php
CHANGED
@@ -359,7 +359,7 @@ class QM_Output_Html_HTTP extends QM_Output_Html {
|
|
359 |
}
|
360 |
|
361 |
function register_qm_output_html_http( array $output, QM_Collectors $collectors ) {
|
362 |
-
$collector =
|
363 |
if ( $collector ) {
|
364 |
$output['http'] = new QM_Output_Html_HTTP( $collector );
|
365 |
}
|
359 |
}
|
360 |
|
361 |
function register_qm_output_html_http( array $output, QM_Collectors $collectors ) {
|
362 |
+
$collector = QM_Collectors::get( 'http' );
|
363 |
if ( $collector ) {
|
364 |
$output['http'] = new QM_Output_Html_HTTP( $collector );
|
365 |
}
|
output/html/languages.php
CHANGED
@@ -101,7 +101,7 @@ class QM_Output_Html_Languages extends QM_Output_Html {
|
|
101 |
}
|
102 |
|
103 |
function register_qm_output_html_languages( array $output, QM_Collectors $collectors ) {
|
104 |
-
$collector =
|
105 |
if ( $collector ) {
|
106 |
$output['languages'] = new QM_Output_Html_Languages( $collector );
|
107 |
}
|
101 |
}
|
102 |
|
103 |
function register_qm_output_html_languages( array $output, QM_Collectors $collectors ) {
|
104 |
+
$collector = QM_Collectors::get( 'languages' );
|
105 |
if ( $collector ) {
|
106 |
$output['languages'] = new QM_Output_Html_Languages( $collector );
|
107 |
}
|
output/html/logger.php
CHANGED
@@ -156,7 +156,7 @@ class QM_Output_Html_Logger extends QM_Output_Html {
|
|
156 |
}
|
157 |
|
158 |
function register_qm_output_html_logger( array $output, QM_Collectors $collectors ) {
|
159 |
-
$collector =
|
160 |
if ( $collector ) {
|
161 |
$output['logger'] = new QM_Output_Html_Logger( $collector );
|
162 |
}
|
156 |
}
|
157 |
|
158 |
function register_qm_output_html_logger( array $output, QM_Collectors $collectors ) {
|
159 |
+
$collector = QM_Collectors::get( 'logger' );
|
160 |
if ( $collector ) {
|
161 |
$output['logger'] = new QM_Output_Html_Logger( $collector );
|
162 |
}
|
output/html/overview.php
CHANGED
@@ -16,7 +16,6 @@ class QM_Output_Html_Overview extends QM_Output_Html {
|
|
16 |
$data = $this->collector->get_data();
|
17 |
|
18 |
$db_query_num = null;
|
19 |
-
$db_query_types = array();
|
20 |
$db_queries = QM_Collectors::get( 'db_queries' );
|
21 |
|
22 |
if ( $db_queries ) {
|
@@ -169,76 +168,53 @@ class QM_Output_Html_Overview extends QM_Output_Html {
|
|
169 |
number_format_i18n( $cache_data['stats']['cache_hits'], 0 ),
|
170 |
number_format_i18n( $cache_data['stats']['cache_misses'], 0 )
|
171 |
) );
|
172 |
-
|
173 |
-
if ( $cache_data['display_hit_rate_warning'] ) {
|
174 |
-
printf(
|
175 |
-
'<br><a href="%s" class="qm-external-link">%s</a>',
|
176 |
-
'https://github.com/johnbillion/query-monitor/wiki/Cache-Hit-Rate',
|
177 |
-
esc_html__( 'Why is this value 100%?', 'query-monitor' )
|
178 |
-
);
|
179 |
-
}
|
180 |
-
|
181 |
echo '</p>';
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
echo esc_html( sprintf(
|
189 |
-
/* translators: %s: Name of cache driver */
|
190 |
-
__( 'Opcode cache in use: %s', 'query-monitor' ),
|
191 |
-
$opcache_name
|
192 |
-
) );
|
193 |
-
echo '</p>';
|
194 |
-
}
|
195 |
-
} elseif ( ! empty( $installed_opcode_caches ) ) {
|
196 |
echo '<ul>';
|
197 |
-
foreach ( $
|
198 |
echo '<li><span class="qm-warn">';
|
199 |
echo esc_html( sprintf(
|
200 |
-
/* translators: %s: PHP
|
201 |
-
__( 'The %s
|
202 |
$name
|
203 |
) );
|
204 |
echo '</span></li>';
|
205 |
}
|
206 |
echo '</ul>';
|
207 |
}
|
|
|
208 |
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
echo '<p><span class="qm-warn"><span class="dashicons dashicons-warning" aria-hidden="true"></span>';
|
219 |
-
echo esc_html__( 'External object cache not in use', 'query-monitor' );
|
220 |
-
echo '</span></p>';
|
221 |
-
|
222 |
-
$potentials = array_filter( $cache_data['object_cache_extensions'] );
|
223 |
-
|
224 |
-
if ( ! empty( $potentials ) ) {
|
225 |
-
echo '<ul>';
|
226 |
-
foreach ( $potentials as $name => $value ) {
|
227 |
-
echo '<li><span class="qm-warn">';
|
228 |
-
echo esc_html( sprintf(
|
229 |
-
/* translators: %s: PHP extension name */
|
230 |
-
__( 'The %s extension for PHP is installed but is not in use by WordPress', 'query-monitor' ),
|
231 |
-
$name
|
232 |
-
) );
|
233 |
-
echo '</span></li>';
|
234 |
-
}
|
235 |
-
echo '</ul>';
|
236 |
-
}
|
237 |
}
|
238 |
-
} else {
|
239 |
-
echo '<span class="qm-info">';
|
240 |
-
echo esc_html__( 'Object cache information is not available', 'query-monitor' );
|
241 |
-
echo '</span>';
|
242 |
}
|
243 |
|
244 |
echo '</section>';
|
@@ -277,7 +253,7 @@ class QM_Output_Html_Overview extends QM_Output_Html {
|
|
277 |
}
|
278 |
|
279 |
function register_qm_output_html_overview( array $output, QM_Collectors $collectors ) {
|
280 |
-
$collector =
|
281 |
if ( $collector ) {
|
282 |
$output['overview'] = new QM_Output_Html_Overview( $collector );
|
283 |
}
|
16 |
$data = $this->collector->get_data();
|
17 |
|
18 |
$db_query_num = null;
|
|
|
19 |
$db_queries = QM_Collectors::get( 'db_queries' );
|
20 |
|
21 |
if ( $db_queries ) {
|
168 |
number_format_i18n( $cache_data['stats']['cache_hits'], 0 ),
|
169 |
number_format_i18n( $cache_data['stats']['cache_misses'], 0 )
|
170 |
) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
echo '</p>';
|
172 |
+
} else {
|
173 |
+
echo '<p>';
|
174 |
+
echo esc_html__( 'Object cache statistics are not available', 'query-monitor' );
|
175 |
+
echo '</p>';
|
176 |
+
}
|
177 |
|
178 |
+
if ( $cache_data['has_object_cache'] ) {
|
179 |
+
echo '<p><span class="qm-info">';
|
180 |
+
printf(
|
181 |
+
'<a href="%s" class="qm-link">%s</a>',
|
182 |
+
esc_url( network_admin_url( 'plugins.php?plugin_status=dropins' ) ),
|
183 |
+
esc_html__( 'External object cache in use', 'query-monitor' )
|
184 |
+
);
|
185 |
+
echo '</span></p>';
|
186 |
+
} else {
|
187 |
+
echo '<p><span class="qm-warn"><span class="dashicons dashicons-warning" aria-hidden="true"></span>';
|
188 |
+
echo esc_html__( 'External object cache not in use', 'query-monitor' );
|
189 |
+
echo '</span></p>';
|
190 |
|
191 |
+
$potentials = array_filter( $cache_data['object_cache_extensions'] );
|
192 |
+
|
193 |
+
if ( ! empty( $potentials ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
echo '<ul>';
|
195 |
+
foreach ( $potentials as $name => $value ) {
|
196 |
echo '<li><span class="qm-warn">';
|
197 |
echo esc_html( sprintf(
|
198 |
+
/* translators: %s: PHP extension name */
|
199 |
+
__( 'The %s extension for PHP is installed but is not in use by WordPress', 'query-monitor' ),
|
200 |
$name
|
201 |
) );
|
202 |
echo '</span></li>';
|
203 |
}
|
204 |
echo '</ul>';
|
205 |
}
|
206 |
+
}
|
207 |
|
208 |
+
if ( $cache_data['has_opcode_cache'] ) {
|
209 |
+
foreach ( array_filter( $cache_data['opcode_cache_extensions'] ) as $opcache_name => $opcache_state ) {
|
210 |
+
echo '<p>';
|
211 |
+
echo esc_html( sprintf(
|
212 |
+
/* translators: %s: Name of cache driver */
|
213 |
+
__( 'Opcode cache in use: %s', 'query-monitor' ),
|
214 |
+
$opcache_name
|
215 |
+
) );
|
216 |
+
echo '</p>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
}
|
|
|
|
|
|
|
|
|
218 |
}
|
219 |
|
220 |
echo '</section>';
|
253 |
}
|
254 |
|
255 |
function register_qm_output_html_overview( array $output, QM_Collectors $collectors ) {
|
256 |
+
$collector = QM_Collectors::get( 'overview' );
|
257 |
if ( $collector ) {
|
258 |
$output['overview'] = new QM_Output_Html_Overview( $collector );
|
259 |
}
|
output/html/php_errors.php
CHANGED
@@ -250,7 +250,7 @@ class QM_Output_Html_PHP_Errors extends QM_Output_Html {
|
|
250 |
}
|
251 |
|
252 |
function register_qm_output_html_php_errors( array $output, QM_Collectors $collectors ) {
|
253 |
-
$collector =
|
254 |
if ( $collector ) {
|
255 |
$output['php_errors'] = new QM_Output_Html_PHP_Errors( $collector );
|
256 |
}
|
250 |
}
|
251 |
|
252 |
function register_qm_output_html_php_errors( array $output, QM_Collectors $collectors ) {
|
253 |
+
$collector = QM_Collectors::get( 'php_errors' );
|
254 |
if ( $collector ) {
|
255 |
$output['php_errors'] = new QM_Output_Html_PHP_Errors( $collector );
|
256 |
}
|
output/html/request.php
CHANGED
@@ -189,7 +189,7 @@ class QM_Output_Html_Request extends QM_Output_Html {
|
|
189 |
}
|
190 |
|
191 |
function register_qm_output_html_request( array $output, QM_Collectors $collectors ) {
|
192 |
-
$collector =
|
193 |
if ( $collector ) {
|
194 |
$output['request'] = new QM_Output_Html_Request( $collector );
|
195 |
}
|
189 |
}
|
190 |
|
191 |
function register_qm_output_html_request( array $output, QM_Collectors $collectors ) {
|
192 |
+
$collector = QM_Collectors::get( 'request' );
|
193 |
if ( $collector ) {
|
194 |
$output['request'] = new QM_Output_Html_Request( $collector );
|
195 |
}
|
output/html/theme.php
CHANGED
@@ -168,7 +168,7 @@ function register_qm_output_html_theme( array $output, QM_Collectors $collectors
|
|
168 |
if ( is_admin() ) {
|
169 |
return $output;
|
170 |
}
|
171 |
-
$collector =
|
172 |
if ( $collector ) {
|
173 |
$output['response'] = new QM_Output_Html_Theme( $collector );
|
174 |
}
|
168 |
if ( is_admin() ) {
|
169 |
return $output;
|
170 |
}
|
171 |
+
$collector = QM_Collectors::get( 'response' );
|
172 |
if ( $collector ) {
|
173 |
$output['response'] = new QM_Output_Html_Theme( $collector );
|
174 |
}
|
output/html/timing.php
CHANGED
@@ -169,7 +169,7 @@ class QM_Output_Html_Timing extends QM_Output_Html {
|
|
169 |
}
|
170 |
|
171 |
function register_qm_output_html_timing( array $output, QM_Collectors $collectors ) {
|
172 |
-
$collector =
|
173 |
if ( $collector ) {
|
174 |
$output['timing'] = new QM_Output_Html_Timing( $collector );
|
175 |
}
|
169 |
}
|
170 |
|
171 |
function register_qm_output_html_timing( array $output, QM_Collectors $collectors ) {
|
172 |
+
$collector = QM_Collectors::get( 'timing' );
|
173 |
if ( $collector ) {
|
174 |
$output['timing'] = new QM_Output_Html_Timing( $collector );
|
175 |
}
|
output/html/transients.php
CHANGED
@@ -137,7 +137,7 @@ class QM_Output_Html_Transients extends QM_Output_Html {
|
|
137 |
}
|
138 |
|
139 |
function register_qm_output_html_transients( array $output, QM_Collectors $collectors ) {
|
140 |
-
$collector =
|
141 |
if ( $collector ) {
|
142 |
$output['transients'] = new QM_Output_Html_Transients( $collector );
|
143 |
}
|
137 |
}
|
138 |
|
139 |
function register_qm_output_html_transients( array $output, QM_Collectors $collectors ) {
|
140 |
+
$collector = QM_Collectors::get( 'transients' );
|
141 |
if ( $collector ) {
|
142 |
$output['transients'] = new QM_Output_Html_Transients( $collector );
|
143 |
}
|
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.
|
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.2
|
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.
|
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.1
|
6 |
+
Stable tag: 3.3.2
|
7 |
License: GPLv2 or later
|
8 |
Requires PHP: 5.3
|
9 |
|