Version Description
Improved compatibility with the WordPress.com toolbar in Jetpack
Download this release
Release Info
Developer | westi |
Plugin | Debug Bar |
Version | 1.0 |
Comparing to | |
See all releases |
Code changes from version 0.9 to 1.0
- debug-bar.php +7 -7
- panels/class-debug-bar-queries.php +4 -5
- readme.txt +5 -2
debug-bar.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin URI: https://wordpress.org/plugins/debug-bar/
|
5 |
Description: Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
|
6 |
Author: wordpressdotorg
|
7 |
-
Version: 0
|
8 |
Author URI: https://wordpress.org/
|
9 |
Text Domain: debug-bar
|
10 |
*/
|
@@ -39,11 +39,11 @@ class Debug_Bar {
|
|
39 |
|
40 |
load_plugin_textdomain( 'debug-bar' );
|
41 |
|
42 |
-
add_action( '
|
43 |
-
add_action( 'admin_footer',
|
44 |
-
add_action( 'wp_footer',
|
45 |
-
add_action( 'wp_head',
|
46 |
-
add_filter( 'body_class',
|
47 |
add_filter( 'admin_body_class', array( $this, 'body_class' ) );
|
48 |
|
49 |
$this->requirements();
|
@@ -150,7 +150,7 @@ class Debug_Bar {
|
|
150 |
return function_exists( 'memory_get_peak_usage' ) ? memory_get_peak_usage() : memory_get_usage();
|
151 |
}
|
152 |
|
153 |
-
function
|
154 |
global $wp_admin_bar;
|
155 |
|
156 |
$classes = apply_filters( 'debug_bar_classes', array() );
|
4 |
Plugin URI: https://wordpress.org/plugins/debug-bar/
|
5 |
Description: Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
|
6 |
Author: wordpressdotorg
|
7 |
+
Version: 1.0
|
8 |
Author URI: https://wordpress.org/
|
9 |
Text Domain: debug-bar
|
10 |
*/
|
39 |
|
40 |
load_plugin_textdomain( 'debug-bar' );
|
41 |
|
42 |
+
add_action( 'wp_before_admin_bar_render', array( $this, 'wp_before_admin_bar_render' ), 1000000 );
|
43 |
+
add_action( 'admin_footer', array( $this, 'render' ), 1000 );
|
44 |
+
add_action( 'wp_footer', array( $this, 'render' ), 1000 );
|
45 |
+
add_action( 'wp_head', array( $this, 'ensure_ajaxurl' ), 1 );
|
46 |
+
add_filter( 'body_class', array( $this, 'body_class' ) );
|
47 |
add_filter( 'admin_body_class', array( $this, 'body_class' ) );
|
48 |
|
49 |
$this->requirements();
|
150 |
return function_exists( 'memory_get_peak_usage' ) ? memory_get_peak_usage() : memory_get_usage();
|
151 |
}
|
152 |
|
153 |
+
function wp_before_admin_bar_render() {
|
154 |
global $wp_admin_bar;
|
155 |
|
156 |
$classes = apply_filters( 'debug_bar_classes', array() );
|
panels/class-debug-bar-queries.php
CHANGED
@@ -50,10 +50,9 @@ class Debug_Bar_Queries extends Debug_Bar_Panel {
|
|
50 |
$debug = str_replace( array( 'do_action, call_user_func_array' ), array( 'do_action' ), $debug );
|
51 |
$debug = esc_html( $debug );
|
52 |
$query = nl2br( esc_html( $query ) );
|
53 |
-
/* translators: %
|
54 |
-
$time = esc_html( sprintf( __( '%
|
55 |
|
56 |
-
/* translators: %d = duration time in microseconds. */
|
57 |
$out .= "<li>$query<br/><div class='qdebug'>$debug <span>#$counter ($time)</span></div></li>\n";
|
58 |
}
|
59 |
$out .= '</ol>';
|
@@ -81,8 +80,8 @@ class Debug_Bar_Queries extends Debug_Bar_Panel {
|
|
81 |
}
|
82 |
if ( $total_time ) {
|
83 |
$heading .= '<h2><span>' . __( 'Total query time:', 'debug-bar' ) . '</span>';
|
84 |
-
/* translators: %
|
85 |
-
$heading .= sprintf( __( '%
|
86 |
}
|
87 |
if ( ! empty( $EZSQL_ERROR ) ) {
|
88 |
$heading .= '<h2><span>' . __( 'Total DB Errors:', 'debug-bar' ) . '</span>' . number_format_i18n( count( $EZSQL_ERROR ) ) . "</h2>\n";
|
50 |
$debug = str_replace( array( 'do_action, call_user_func_array' ), array( 'do_action' ), $debug );
|
51 |
$debug = esc_html( $debug );
|
52 |
$query = nl2br( esc_html( $query ) );
|
53 |
+
/* translators: %s = duration in milliseconds. */
|
54 |
+
$time = esc_html( sprintf( __( '%s ms', 'debug-bar' ), number_format_i18n( ( $elapsed * 1000 ), 1 ) ) );
|
55 |
|
|
|
56 |
$out .= "<li>$query<br/><div class='qdebug'>$debug <span>#$counter ($time)</span></div></li>\n";
|
57 |
}
|
58 |
$out .= '</ol>';
|
80 |
}
|
81 |
if ( $total_time ) {
|
82 |
$heading .= '<h2><span>' . __( 'Total query time:', 'debug-bar' ) . '</span>';
|
83 |
+
/* translators: %s = duration in milliseconds. */
|
84 |
+
$heading .= sprintf( __( '%s ms', 'debug-bar' ), number_format_i18n( ( $total_time * 1000 ), 1 ) ) . "</h2>\n";
|
85 |
}
|
86 |
if ( ! empty( $EZSQL_ERROR ) ) {
|
87 |
$heading .= '<h2><span>' . __( 'Total DB Errors:', 'debug-bar' ) . '</span>' . number_format_i18n( count( $EZSQL_ERROR ) ) . "</h2>\n";
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== Debug Bar ===
|
2 |
Contributors: wordpressdotorg, ryan, westi, koopersmith, duck_, mitchoyoshitaka, dd32, jrf, obenland
|
3 |
Tags: debug
|
4 |
-
Tested up to: 4.8
|
5 |
-
Stable tag: 0
|
6 |
Requires at least: 3.4
|
7 |
|
8 |
Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
|
@@ -29,6 +29,9 @@ There are numerous other add-ons available to get more insight into, for instanc
|
|
29 |
|
30 |
== Upgrade Notice ==
|
31 |
|
|
|
|
|
|
|
32 |
= 0.9 =
|
33 |
Added panel navigation to toolbar.
|
34 |
Improved localization support.
|
1 |
=== Debug Bar ===
|
2 |
Contributors: wordpressdotorg, ryan, westi, koopersmith, duck_, mitchoyoshitaka, dd32, jrf, obenland
|
3 |
Tags: debug
|
4 |
+
Tested up to: 4.9.8
|
5 |
+
Stable tag: 1.0
|
6 |
Requires at least: 3.4
|
7 |
|
8 |
Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
|
29 |
|
30 |
== Upgrade Notice ==
|
31 |
|
32 |
+
= 1.0 =
|
33 |
+
Improved compatibility with the WordPress.com toolbar in Jetpack
|
34 |
+
|
35 |
= 0.9 =
|
36 |
Added panel navigation to toolbar.
|
37 |
Improved localization support.
|