Version Description
Download this release
Release Info
Developer | johnbillion |
Plugin | Query Monitor |
Version | 3.5.2 |
Comparing to | |
See all releases |
Code changes from version 3.5.1 to 3.5.2
- collectors/block_editor.php +12 -5
- query-monitor.php +1 -1
- readme.txt +2 -2
collectors/block_editor.php
CHANGED
@@ -53,16 +53,23 @@ class QM_Collector_Block_Editor extends QM_Collector {
|
|
53 |
}
|
54 |
|
55 |
public function process() {
|
|
|
|
|
56 |
$this->data['block_editor_enabled'] = self::wp_block_editor_enabled();
|
57 |
|
58 |
-
if ( !
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
return;
|
60 |
}
|
61 |
|
62 |
-
$
|
63 |
-
|
64 |
-
$this->data['post_has_blocks'] = self::wp_has_blocks( $post->post_content );
|
65 |
-
$this->data['post_blocks'] = self::wp_parse_blocks( $post->post_content );
|
66 |
$this->data['all_dynamic_blocks'] = self::wp_get_dynamic_block_names();
|
67 |
$this->data['total_blocks'] = 0;
|
68 |
$this->data['has_block_timing'] = false;
|
53 |
}
|
54 |
|
55 |
public function process() {
|
56 |
+
global $_wp_current_template_content;
|
57 |
+
|
58 |
$this->data['block_editor_enabled'] = self::wp_block_editor_enabled();
|
59 |
|
60 |
+
if ( ! empty( $_wp_current_template_content ) ) {
|
61 |
+
// Full site editor:
|
62 |
+
$content = $_wp_current_template_content;
|
63 |
+
} elseif ( is_singular() ) {
|
64 |
+
// Post editor:
|
65 |
+
$content = get_post( get_queried_object_id() )->post_content;
|
66 |
+
} else {
|
67 |
+
// Nada:
|
68 |
return;
|
69 |
}
|
70 |
|
71 |
+
$this->data['post_has_blocks'] = self::wp_has_blocks( $content );
|
72 |
+
$this->data['post_blocks'] = self::wp_parse_blocks( $content );
|
|
|
|
|
73 |
$this->data['all_dynamic_blocks'] = self::wp_get_dynamic_block_names();
|
74 |
$this->data['total_blocks'] = 0;
|
75 |
$this->data['has_block_timing'] = false;
|
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.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.5.2
|
14 |
* Plugin URI: https://querymonitor.com/
|
15 |
* Author: John Blackbourn
|
16 |
* Author URI: https://querymonitor.com/
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
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.
|
6 |
-
Stable tag: 3.5.
|
7 |
License: GPLv2 or later
|
8 |
Requires PHP: 5.3
|
9 |
|
2 |
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.4
|
6 |
+
Stable tag: 3.5.2
|
7 |
License: GPLv2 or later
|
8 |
Requires PHP: 5.3
|
9 |
|