Version Description
Added maximize/restore button Added cookie to keep track of debug bar state Added post type information to WP_Query tab Bug fix where bottom of page was obscured in the admin
Download this release
Release Info
Developer | koopersmith |
Plugin | Debug Bar |
Version | 0.6 |
Comparing to | |
See all releases |
Code changes from version 0.5 to 0.6
- css/debug-bar.css +1 -1
- css/debug-bar.dev.css +54 -5
- debug-bar.php +23 -15
- js/debug-bar.dev.js +117 -23
- js/debug-bar.js +1 -1
- js/ui-dockable.dev.js +7 -3
- js/ui-dockable.js +1 -1
- panels/class-debug-bar-deprecated.php +5 -5
- panels/class-debug-bar-object-cache.php +1 -1
- panels/class-debug-bar-php.php +1 -1
- panels/class-debug-bar-queries.php +4 -4
- panels/class-debug-bar-request.php +1 -1
- panels/class-debug-bar-wp-query.php +9 -4
- readme.txt +15 -1
css/debug-bar.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#wpadminbar #wp-admin-bar-debug-bar{float:right;}#wpadminbar #wp-admin-bar-debug-bar.active{background:#555;background:-moz-linear-gradient(bottom,#555,#3e3e3e);background:-webkit-gradient(linear,left bottom,left top,from(#555),to(#3e3e3e));}#wpadminbar #wp-admin-bar-debug-bar.warning{background-color:#f44;background-image:-moz-linear-gradient(bottom,#d00,#f44);background-image:-webkit-gradient(linear,left bottom,left top,from(#d00),to(#f44));}#wpadminbar #wp-admin-bar-debug-bar.warning:hover,#wpadminbar #wp-admin-bar-debug-bar.warning.active{background-color:#d00;background-image:-moz-linear-gradient(bottom,#f44,#d00);background-image:-webkit-gradient(linear,left bottom,left top,from(#f44),to(#d00));}#wpadminbar #wp-admin-bar-debug-bar.warning a{color:#fff;text-shadow:0 -1px 0 #700;}#wpadminbar #wp-admin-bar-debug-bar.notice{background-color:#ff8922;background-image:-moz-linear-gradient(bottom,#ee6f00,#ff8922);background-image:-webkit-gradient(linear,left bottom,left top,from(#ee6f00),to(#ff8922));}#wpadminbar #wp-admin-bar-debug-bar.notice:hover,#wpadminbar #wp-admin-bar-debug-bar.notice.active{background-color:#ee6f00;background-image:-moz-linear-gradient(bottom,#ff8922,#ee6f00);background-image:-webkit-gradient(linear,left bottom,left top,from(#ff8922),to(#ee6f00));}#wpadminbar #wp-admin-bar-debug-bar.notice a{color:#fff;text-shadow:0 -1px 0 #884000;}#querylist{font-family:Arial,Tahoma,sans-serif;display:none;position:fixed;height:250px;left:0;right:0;bottom:0;background:#fff;z-index:99999;color:#000;line-height:150%!important;text-align:left;}#debug-bar-handle{border-color:#c6c6c6;border-style:solid;border-width:1px 0;height:2px;background:#fff;cursor:n-resize;}#debug-bar-menu{background:#d9d9d9;background:-moz-linear-gradient(bottom,#d7d7d7,#e4e4e4);background:-webkit-gradient(linear,left bottom,left top,from(#d7d7d7),to(#e4e4e4));overflow:hidden;height:24px;text-shadow:0 1px 0 #f4f4f4;}#debug-
|
1 |
+
#wpadminbar #wp-admin-bar-debug-bar{float:right;}#wpadminbar #wp-admin-bar-debug-bar.active{background:#555;background:-moz-linear-gradient(bottom,#555,#3e3e3e);background:-webkit-gradient(linear,left bottom,left top,from(#555),to(#3e3e3e));}#wpadminbar #wp-admin-bar-debug-bar.warning{background-color:#f44;background-image:-moz-linear-gradient(bottom,#d00,#f44);background-image:-webkit-gradient(linear,left bottom,left top,from(#d00),to(#f44));}#wpadminbar #wp-admin-bar-debug-bar.warning:hover,#wpadminbar #wp-admin-bar-debug-bar.warning.active{background-color:#d00;background-image:-moz-linear-gradient(bottom,#f44,#d00);background-image:-webkit-gradient(linear,left bottom,left top,from(#f44),to(#d00));}#wpadminbar #wp-admin-bar-debug-bar.warning a{color:#fff;text-shadow:0 -1px 0 #700;}#wpadminbar #wp-admin-bar-debug-bar.notice{background-color:#ff8922;background-image:-moz-linear-gradient(bottom,#ee6f00,#ff8922);background-image:-webkit-gradient(linear,left bottom,left top,from(#ee6f00),to(#ff8922));}#wpadminbar #wp-admin-bar-debug-bar.notice:hover,#wpadminbar #wp-admin-bar-debug-bar.notice.active{background-color:#ee6f00;background-image:-moz-linear-gradient(bottom,#ff8922,#ee6f00);background-image:-webkit-gradient(linear,left bottom,left top,from(#ff8922),to(#ee6f00));}#wpadminbar #wp-admin-bar-debug-bar.notice a{color:#fff;text-shadow:0 -1px 0 #884000;}#querylist{font-family:Arial,Tahoma,sans-serif;display:none;position:fixed;height:250px;left:0;right:0;bottom:0;background:#fff;z-index:99999;color:#000;line-height:150%!important;text-align:left;}#debug-bar-handle{border-color:#c6c6c6;border-style:solid;border-width:1px 0;height:2px;background:#fff;cursor:n-resize;}#debug-bar-menu{background:#d9d9d9;background:-moz-linear-gradient(bottom,#d7d7d7,#e4e4e4);background:-webkit-gradient(linear,left bottom,left top,from(#d7d7d7),to(#e4e4e4));overflow:hidden;height:24px;text-shadow:0 1px 0 #f4f4f4;}#debug-bar-menu-right{float:right;}#debug-status{float:left;text-align:right;padding-top:4px;padding-right:15px;color:#bbb;}#debug-status .debug-status-title{color:#999;}#debug-status .debug-status-data{color:#999;font-weight:bold;}#debug-status #debug-status-warning{font-weight:bold;color:red;}#debug-status #debug-status-site{font-weight:bold;}#querylist pre{font-size:12px;padding:10px;}#querylist .left{float:left;}#querylist .right{float:right;}#querylist h1,#querylist h2,#querylist h3{font-weight:normal;}#debug-menu-links{clear:left;padding:3px 15px 0;overflow:hidden;list-style:none;margin:0;}#debug-menu-links li{float:left;margin-right:10px;margin-bottom:0!important;}#debug-menu-links li a{outline:none;display:block;line-height:16px;padding:2px 9px 3px;margin-right:0;color:#777!important;text-decoration:none!important;font-weight:bold!important;font-size:12px;-webkit-border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px;}#debug-menu-links li a:hover{color:#555!important;background-color:#eee;background-image:-moz-linear-gradient(bottom,#ddd,#eee);background-image:-webkit-gradient(linear,left bottom,left top,from(#ddd),to(#eee));}#debug-menu-links li a.current{background:#fff;color:#222!important;}#querylist h2{float:left;min-width:150px;border:1px solid #eee;padding:5px 10px 15px;clear:none;text-align:center;font-family:georgia,times,serif;font-size:28px;margin:15px 10px 15px 0!important;}#querylist h2 span{font-size:12px;color:#888;text-transform:uppercase;white-space:nowrap;display:block;margin-bottom:5px;}#object-cache-stats h2{border:none;float:none;text-align:left;font-size:22px;margin-bottom:0;}#querylist h3{margin-bottom:15px;}#querylist ol.wpd-queries{padding:0!important;margin:0!important;list-style:none;clear:left;}#querylist ol.wpd-queries li{padding:10px;background:#f0f0f0;margin:0 0 10px 0;}#querylist ol.wpd-queries li div.qdebug{background:#e8e8e8;margin:10px -10px -10px -10px;padding:5px 150px 5px 5px;font-size:11px;position:relative;min-height:20px;}#querylist ol.wpd-queries li div.qdebug span{position:absolute;right:10px;top:5px;white-space:nowrap;}#querylist a{text-decoration:underline!important;color:blue!important;}#querylist a:hover{text-decoration:none!important;}#debug-menu-targets{overflow:auto;position:absolute;top:28px;left:0;right:0;bottom:0;}#querylist .debug-menu-target{margin:10px;display:none;}#querylist ol{font:12px Monaco,"Courier New",Courier,Fixed!important;line-height:180%!important;}#debug-bar-php ol.debug-bar-php-list{padding:0!important;margin:0!important;list-style:none;clear:left;}#debug-bar-php ol.debug-bar-php-list li{padding:10px;margin:0 0 10px 0;}#debug-bar-php .debug-bar-php-warning{background-color:#ffebe8;border:1px solid #c00;}#debug-bar-php .debug-bar-php-notice{background-color:#ffffe0;border:1px solid #e6db55;}#debug-bar-deprecated ol.debug-bar-deprecated-list{padding:0!important;margin:0!important;list-style:none;clear:left;}#debug-bar-deprecated ol.debug-bar-deprecated-list li{padding:10px;margin:0 0 10px 0;background:#f0f0f0;}#debug-bar-wp-query ol.debug-bar-wp-query-list{padding:0!important;margin:0!important;list-style:none;clear:left;}#debug-bar-wp-query ol.debug-bar-wp-query-list li,#debug-bar-wp-query p,#debug-bar-request p{padding:10px;margin:0 0 10px 0;background:#f0f0f0;}#debug-bar-wp-query h3,#debug-bar-request h3{float:none;clear:both;font-family:georgia,times,serif;font-size:22px;margin:15px 10px 15px 0!important;}#debug-bar-actions{float:left;margin-top:5px;margin-right:5px;}#debug-bar-actions span{-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;display:block;float:left;font-size:16px;height:12px;line-height:13px;width:12px;color:#eee;background:#aaa;background:-moz-linear-gradient(bottom,#999,#bbb);background:-webkit-gradient(linear,left bottom,left top,from(#999),to(#bbb));text-shadow:0 1px 0 #999;border:1px solid #999;text-align:center;cursor:pointer;}#debug-bar-actions span.minus{line-height:10px;font-size:14px;}#debug-bar-actions span:hover{background:#888;background:-moz-linear-gradient(bottom,#999,#777);background:-webkit-gradient(linear,left bottom,left top,from(#999),to(#777));border:1px solid #777;text-shadow:0 1px 0 #777;}
|
css/debug-bar.dev.css
CHANGED
@@ -62,6 +62,10 @@
|
|
62 |
line-height: 150% !important;
|
63 |
text-align: left;
|
64 |
}
|
|
|
|
|
|
|
|
|
65 |
|
66 |
#debug-bar-handle {
|
67 |
border-color: #c6c6c6;
|
@@ -72,6 +76,12 @@
|
|
72 |
cursor: n-resize;
|
73 |
}
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
#debug-bar-menu {
|
76 |
background: #d9d9d9; /* fallback color */
|
77 |
background:-moz-linear-gradient(bottom, #d7d7d7, #e4e4e4);
|
@@ -80,9 +90,12 @@
|
|
80 |
height: 24px;
|
81 |
text-shadow: 0 1px 0 #f4f4f4;
|
82 |
}
|
|
|
|
|
|
|
83 |
|
84 |
#debug-status {
|
85 |
-
float:
|
86 |
text-align: right;
|
87 |
padding-top: 4px;
|
88 |
padding-right: 15px;
|
@@ -194,20 +207,20 @@
|
|
194 |
margin-bottom: 15px;
|
195 |
}
|
196 |
|
197 |
-
#querylist ol
|
198 |
padding: 0 !important;
|
199 |
margin: 0 !important;
|
200 |
list-style: none;
|
201 |
clear: left;
|
202 |
}
|
203 |
|
204 |
-
#querylist ol
|
205 |
padding: 10px;
|
206 |
background: #f0f0f0;
|
207 |
margin: 0 0 10px 0;
|
208 |
}
|
209 |
|
210 |
-
#querylist ol
|
211 |
background: #e8e8e8;
|
212 |
margin: 10px -10px -10px -10px;
|
213 |
padding: 5px 150px 5px 5px;
|
@@ -216,7 +229,7 @@
|
|
216 |
min-height: 20px;
|
217 |
}
|
218 |
|
219 |
-
#querylist ol
|
220 |
position: absolute;
|
221 |
right: 10px;
|
222 |
top: 5px;
|
@@ -305,4 +318,40 @@
|
|
305 |
font-family: georgia, times, serif;
|
306 |
font-size: 22px;
|
307 |
margin: 15px 10px 15px 0 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
}
|
62 |
line-height: 150% !important;
|
63 |
text-align: left;
|
64 |
}
|
65 |
+
#querylist.db-dockable-disabled {
|
66 |
+
height: auto;
|
67 |
+
top: 28px;
|
68 |
+
}
|
69 |
|
70 |
#debug-bar-handle {
|
71 |
border-color: #c6c6c6;
|
76 |
cursor: n-resize;
|
77 |
}
|
78 |
|
79 |
+
.db-dockable-disabled #debug-bar-handle {
|
80 |
+
cursor: inherit;
|
81 |
+
height: 1px;
|
82 |
+
border-top: 0;
|
83 |
+
}
|
84 |
+
|
85 |
#debug-bar-menu {
|
86 |
background: #d9d9d9; /* fallback color */
|
87 |
background:-moz-linear-gradient(bottom, #d7d7d7, #e4e4e4);
|
90 |
height: 24px;
|
91 |
text-shadow: 0 1px 0 #f4f4f4;
|
92 |
}
|
93 |
+
#debug-bar-menu-right {
|
94 |
+
float: right;
|
95 |
+
}
|
96 |
|
97 |
#debug-status {
|
98 |
+
float: left;
|
99 |
text-align: right;
|
100 |
padding-top: 4px;
|
101 |
padding-right: 15px;
|
207 |
margin-bottom: 15px;
|
208 |
}
|
209 |
|
210 |
+
#querylist ol.wpd-queries {
|
211 |
padding: 0 !important;
|
212 |
margin: 0 !important;
|
213 |
list-style: none;
|
214 |
clear: left;
|
215 |
}
|
216 |
|
217 |
+
#querylist ol.wpd-queries li {
|
218 |
padding: 10px;
|
219 |
background: #f0f0f0;
|
220 |
margin: 0 0 10px 0;
|
221 |
}
|
222 |
|
223 |
+
#querylist ol.wpd-queries li div.qdebug {
|
224 |
background: #e8e8e8;
|
225 |
margin: 10px -10px -10px -10px;
|
226 |
padding: 5px 150px 5px 5px;
|
229 |
min-height: 20px;
|
230 |
}
|
231 |
|
232 |
+
#querylist ol.wpd-queries li div.qdebug span {
|
233 |
position: absolute;
|
234 |
right: 10px;
|
235 |
top: 5px;
|
318 |
font-family: georgia, times, serif;
|
319 |
font-size: 22px;
|
320 |
margin: 15px 10px 15px 0 !important;
|
321 |
+
}
|
322 |
+
|
323 |
+
#debug-bar-actions {
|
324 |
+
float: left;
|
325 |
+
margin-top: 5px;
|
326 |
+
margin-right: 5px;
|
327 |
+
}
|
328 |
+
#debug-bar-actions span {
|
329 |
+
-moz-border-radius: 20px;
|
330 |
+
-webkit-border-radius: 20px;
|
331 |
+
border-radius: 20px;
|
332 |
+
display: block;
|
333 |
+
float: left;
|
334 |
+
font-size: 16px;
|
335 |
+
height: 12px;
|
336 |
+
line-height: 13px;
|
337 |
+
width: 12px;
|
338 |
+
color: #eee;
|
339 |
+
background: #aaa;
|
340 |
+
background: -moz-linear-gradient(bottom, #999, #bbb);
|
341 |
+
background: -webkit-gradient(linear, left bottom, left top, from(#999), to(#bbb));
|
342 |
+
text-shadow: 0 1px 0 #999;
|
343 |
+
border: 1px solid #999;
|
344 |
+
text-align: center;
|
345 |
+
cursor: pointer;
|
346 |
+
}
|
347 |
+
#debug-bar-actions span.minus {
|
348 |
+
line-height: 10px;
|
349 |
+
font-size: 14px;
|
350 |
+
}
|
351 |
+
#debug-bar-actions span:hover {
|
352 |
+
background: #888;
|
353 |
+
background: -moz-linear-gradient(bottom, #999, #777);
|
354 |
+
background: -webkit-gradient(linear, left bottom, left top, from(#999), to(#777));
|
355 |
+
border: 1px solid #777;
|
356 |
+
text-shadow: 0 1px 0 #777;
|
357 |
}
|
debug-bar.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin URI: http://wordpress.org/extend/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: http://wordpress.org/
|
9 |
*/
|
10 |
|
@@ -56,11 +56,9 @@ class Debug_Bar {
|
|
56 |
function enqueue() {
|
57 |
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
|
58 |
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
wp_enqueue_script( 'debug-bar-ui-dockable', "{$url}js/ui-dockable$suffix.js", array('jquery-ui-mouse'), '20110113' );
|
63 |
-
wp_enqueue_script( 'debug-bar', "{$url}js/debug-bar$suffix.js", array('jquery', 'debug-bar-ui-dockable'), '20110114' );
|
64 |
|
65 |
do_action('debug_bar_enqueue_scripts');
|
66 |
}
|
@@ -90,10 +88,16 @@ class Debug_Bar {
|
|
90 |
function ensure_ajaxurl() {
|
91 |
if ( is_admin() )
|
92 |
return;
|
|
|
93 |
?>
|
94 |
<script type="text/javascript">
|
95 |
//<![CDATA[
|
96 |
-
var
|
|
|
|
|
|
|
|
|
|
|
97 |
//]]>
|
98 |
</script>
|
99 |
<?php
|
@@ -108,7 +112,7 @@ class Debug_Bar {
|
|
108 |
/* Add the main siteadmin menu item */
|
109 |
$wp_admin_bar->add_menu( array(
|
110 |
'id' => 'debug-bar',
|
111 |
-
'title' => __('Debug'),
|
112 |
'meta' => array( 'class' => $classes )
|
113 |
) );
|
114 |
}
|
@@ -130,15 +134,16 @@ class Debug_Bar {
|
|
130 |
|
131 |
<div id='debug-bar-handle'></div>
|
132 |
<div id='debug-bar-menu'>
|
|
|
133 |
<div id="debug-status">
|
134 |
<?php //@todo: Add a links to information about WP_DEBUG, PHP version, MySQL version, and Peak Memory.
|
135 |
$statuses = array();
|
136 |
if ( ! WP_DEBUG )
|
137 |
-
$statuses[] = array( 'warning', __('WP_DEBUG OFF'), '' );
|
138 |
-
$statuses[] = array( 'site', sprintf( __('Site #%d on %s'), $GLOBALS['blog_id'], php_uname( 'n' ) ), '' );
|
139 |
-
$statuses[] = array( 'php', __('PHP'), phpversion() );
|
140 |
-
$statuses[] = array( 'db', __('DB'), $wpdb->db_version() );
|
141 |
-
$statuses[] = array( 'memory', __('Mem.'), sprintf( __('%s bytes'), number_format( memory_get_peak_usage() ) ) );
|
142 |
|
143 |
$statuses = apply_filters( 'debug_bar_statuses', $statuses );
|
144 |
|
@@ -155,9 +160,13 @@ class Debug_Bar {
|
|
155 |
}
|
156 |
|
157 |
echo implode( ' | ', $status_html );
|
158 |
-
|
159 |
?>
|
160 |
</div>
|
|
|
|
|
|
|
|
|
|
|
161 |
<ul id="debug-menu-links">
|
162 |
|
163 |
<?php
|
@@ -188,7 +197,6 @@ class Debug_Bar {
|
|
188 |
|
189 |
<div id="debug-menu-target-<?php echo $class; ?>" class="debug-menu-target" <?php echo $current; ?>>
|
190 |
<?php $panel->render(); ?>
|
191 |
-
<?php // echo str_replace( ' ', '', $panel->run() ); ?>
|
192 |
</div>
|
193 |
|
194 |
<?php
|
4 |
Plugin URI: http://wordpress.org/extend/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.6
|
8 |
Author URI: http://wordpress.org/
|
9 |
*/
|
10 |
|
56 |
function enqueue() {
|
57 |
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '.dev' : '';
|
58 |
|
59 |
+
wp_enqueue_style( 'debug-bar', plugins_url( "css/debug-bar$suffix.css", __FILE__ ), array(), '20110114' );
|
60 |
+
wp_enqueue_script( 'debug-bar-ui-dockable', plugins_url( "js/ui-dockable$suffix.js", __FILE__ ), array('jquery-ui-mouse'), '20110113' );
|
61 |
+
wp_enqueue_script( 'debug-bar', plugins_url( "js/debug-bar$suffix.js", __FILE__ ), array('jquery', 'debug-bar-ui-dockable', 'utils'), '20110114' );
|
|
|
|
|
62 |
|
63 |
do_action('debug_bar_enqueue_scripts');
|
64 |
}
|
88 |
function ensure_ajaxurl() {
|
89 |
if ( is_admin() )
|
90 |
return;
|
91 |
+
$current_user = wp_get_current_user();
|
92 |
?>
|
93 |
<script type="text/javascript">
|
94 |
//<![CDATA[
|
95 |
+
var userSettings = {
|
96 |
+
'url': '<?php echo SITECOOKIEPATH; ?>',
|
97 |
+
'uid': '<?php echo $current_user->ID; ?>',
|
98 |
+
'time':'<?php echo time() ?>'
|
99 |
+
},
|
100 |
+
ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>';
|
101 |
//]]>
|
102 |
</script>
|
103 |
<?php
|
112 |
/* Add the main siteadmin menu item */
|
113 |
$wp_admin_bar->add_menu( array(
|
114 |
'id' => 'debug-bar',
|
115 |
+
'title' => __('Debug', 'debug-bar'),
|
116 |
'meta' => array( 'class' => $classes )
|
117 |
) );
|
118 |
}
|
134 |
|
135 |
<div id='debug-bar-handle'></div>
|
136 |
<div id='debug-bar-menu'>
|
137 |
+
<div id='debug-bar-menu-right'>
|
138 |
<div id="debug-status">
|
139 |
<?php //@todo: Add a links to information about WP_DEBUG, PHP version, MySQL version, and Peak Memory.
|
140 |
$statuses = array();
|
141 |
if ( ! WP_DEBUG )
|
142 |
+
$statuses[] = array( 'warning', __('WP_DEBUG OFF', 'debug-bar'), '' );
|
143 |
+
$statuses[] = array( 'site', sprintf( __('Site #%d on %s', 'debug-bar'), $GLOBALS['blog_id'], php_uname( 'n' ) ), '' );
|
144 |
+
$statuses[] = array( 'php', __('PHP', 'debug-bar'), phpversion() );
|
145 |
+
$statuses[] = array( 'db', __('DB', 'debug-bar'), $wpdb->db_version() );
|
146 |
+
$statuses[] = array( 'memory', __('Mem.', 'debug-bar'), sprintf( __('%s bytes', 'debug-bar'), number_format( memory_get_peak_usage() ) ) );
|
147 |
|
148 |
$statuses = apply_filters( 'debug_bar_statuses', $statuses );
|
149 |
|
160 |
}
|
161 |
|
162 |
echo implode( ' | ', $status_html );
|
|
|
163 |
?>
|
164 |
</div>
|
165 |
+
<div id="debug-bar-actions">
|
166 |
+
<span class="plus">+</span>
|
167 |
+
<span class="minus" style="display: none">–</span>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
<ul id="debug-menu-links">
|
171 |
|
172 |
<?php
|
197 |
|
198 |
<div id="debug-menu-target-<?php echo $class; ?>" class="debug-menu-target" <?php echo $current; ?>>
|
199 |
<?php $panel->render(); ?>
|
|
|
200 |
</div>
|
201 |
|
202 |
<?php
|
js/debug-bar.dev.js
CHANGED
@@ -1,6 +1,8 @@
|
|
|
|
|
|
1 |
(function($) {
|
2 |
|
3 |
-
var debugBar, bounds,
|
4 |
|
5 |
bounds = {
|
6 |
adminBarHeight: 0,
|
@@ -14,32 +16,81 @@ bounds = {
|
|
14 |
return debugBar.outerHeight() >= bounds.minHeight
|
15 |
&& $win.height() >= bounds.minHeight;
|
16 |
},
|
17 |
-
|
18 |
-
if (
|
|
|
|
|
19 |
debugBar.height( $win.height() - bounds.adminBarHeight );
|
20 |
-
if ( ! bounds.inLower() )
|
21 |
debugBar.height( bounds.minHeight );
|
22 |
-
|
23 |
},
|
24 |
restore: function(){
|
25 |
-
|
26 |
}
|
27 |
};
|
28 |
|
29 |
-
wpDebugBar = {
|
|
|
|
|
|
|
|
|
30 |
init: function(){
|
31 |
// Initialize variables.
|
32 |
debugBar = $('#querylist');
|
33 |
$win = $(window);
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
bounds.minHeight = $('#debug-bar-handle').outerHeight() + $('#debug-bar-menu').outerHeight();
|
37 |
bounds.adminBarHeight = $('#wpadminbar').outerHeight();
|
38 |
-
bounds.marginBottom = parseInt(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
},
|
44 |
|
45 |
dock: function(){
|
@@ -49,30 +100,42 @@ wpDebugBar = {
|
|
49 |
return bounds.inUpper() && bounds.inLower();
|
50 |
},
|
51 |
resized: function( e, ui ) {
|
52 |
-
bounds.
|
|
|
|
|
|
|
53 |
}
|
54 |
});
|
55 |
|
56 |
// If the window is resized, make sure the debug bar isn't too large.
|
57 |
$win.resize( function(){
|
58 |
-
if ( debugBar.is(':visible') )
|
59 |
-
bounds.
|
60 |
});
|
61 |
},
|
62 |
|
63 |
-
toggle:
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
debugBar.toggle( show );
|
69 |
$(this).toggleClass( 'active', show );
|
70 |
|
71 |
-
if ( show )
|
72 |
-
bounds.
|
73 |
-
|
|
|
74 |
bounds.restore();
|
75 |
-
|
|
|
|
|
76 |
},
|
77 |
|
78 |
tabs: function(){
|
@@ -96,6 +159,37 @@ wpDebugBar = {
|
|
96 |
// The hashed component of the href is the id that we want to display.
|
97 |
$('#' + this.href.substr( this.href.indexOf( '#' ) + 1 ) ).show();
|
98 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
}
|
100 |
};
|
101 |
|
1 |
+
var wpDebugBar;
|
2 |
+
|
3 |
(function($) {
|
4 |
|
5 |
+
var debugBar, bounds, api, $win;
|
6 |
|
7 |
bounds = {
|
8 |
adminBarHeight: 0,
|
16 |
return debugBar.outerHeight() >= bounds.minHeight
|
17 |
&& $win.height() >= bounds.minHeight;
|
18 |
},
|
19 |
+
update: function( to ){
|
20 |
+
if ( typeof to == "number" || to == 'auto' )
|
21 |
+
debugBar.height( to );
|
22 |
+
if ( ! bounds.inUpper() || to == 'upper' )
|
23 |
debugBar.height( $win.height() - bounds.adminBarHeight );
|
24 |
+
if ( ! bounds.inLower() || to == 'lower' )
|
25 |
debugBar.height( bounds.minHeight );
|
26 |
+
api.spacer.css( 'margin-bottom', debugBar.height() + bounds.marginBottom );
|
27 |
},
|
28 |
restore: function(){
|
29 |
+
api.spacer.css( 'margin-bottom', bounds.marginBottom );
|
30 |
}
|
31 |
};
|
32 |
|
33 |
+
wpDebugBar = api = {
|
34 |
+
// The element that we will pad to prevent the debug bar
|
35 |
+
// from overlapping the bottom of the page.
|
36 |
+
spacer: undefined,
|
37 |
+
|
38 |
init: function(){
|
39 |
// Initialize variables.
|
40 |
debugBar = $('#querylist');
|
41 |
$win = $(window);
|
42 |
+
|
43 |
+
// In the admin, we need to pad the footer.
|
44 |
+
api.spacer = $('.wp-admin #footer');
|
45 |
+
// If we're not in the admin, pad the body.
|
46 |
+
if ( ! api.spacer.length )
|
47 |
+
api.spacer = $(document.body);
|
48 |
|
49 |
bounds.minHeight = $('#debug-bar-handle').outerHeight() + $('#debug-bar-menu').outerHeight();
|
50 |
bounds.adminBarHeight = $('#wpadminbar').outerHeight();
|
51 |
+
bounds.marginBottom = parseInt( api.spacer.css('margin-bottom'), 10 );
|
52 |
+
|
53 |
+
api.dock();
|
54 |
+
api.toggle.init();
|
55 |
+
api.tabs();
|
56 |
+
api.actions.init();
|
57 |
+
api.cookie.restore();
|
58 |
+
},
|
59 |
+
|
60 |
+
cookie: {
|
61 |
+
get: function() {
|
62 |
+
var cookie = wpCookies.getHash('wp-debug-bar-' + userSettings.uid);
|
63 |
+
|
64 |
+
if ( ! cookie )
|
65 |
+
return;
|
66 |
|
67 |
+
// Convert the properties to the correct types.
|
68 |
+
cookie.visible = cookie.visible == 'true';
|
69 |
+
cookie.height = parseInt( cookie.height, 10 );
|
70 |
+
return cookie;
|
71 |
+
},
|
72 |
+
update: function() {
|
73 |
+
var name = 'wp-debug-bar-' + userSettings.uid,
|
74 |
+
expires = new Date(),
|
75 |
+
path = userSettings.url,
|
76 |
+
value = {
|
77 |
+
visible: debugBar.is(':visible'),
|
78 |
+
height: debugBar.height()
|
79 |
+
};
|
80 |
+
|
81 |
+
expires.setTime( expires.getTime() + 31536000000 );
|
82 |
+
|
83 |
+
wpCookies.setHash( name, value, expires, path );
|
84 |
+
},
|
85 |
+
restore: function() {
|
86 |
+
var cookie = api.cookie.get();
|
87 |
+
|
88 |
+
if ( ! cookie )
|
89 |
+
return;
|
90 |
+
|
91 |
+
api.toggle.pending = cookie.height;
|
92 |
+
api.toggle.visibility( cookie.visible );
|
93 |
+
}
|
94 |
},
|
95 |
|
96 |
dock: function(){
|
100 |
return bounds.inUpper() && bounds.inLower();
|
101 |
},
|
102 |
resized: function( e, ui ) {
|
103 |
+
bounds.update();
|
104 |
+
},
|
105 |
+
stop: function( e, ui ) {
|
106 |
+
api.cookie.update();
|
107 |
}
|
108 |
});
|
109 |
|
110 |
// If the window is resized, make sure the debug bar isn't too large.
|
111 |
$win.resize( function(){
|
112 |
+
if ( debugBar.is(':visible') && ! debugBar.dockable('option', 'disabled') )
|
113 |
+
bounds.update();
|
114 |
});
|
115 |
},
|
116 |
|
117 |
+
toggle: {
|
118 |
+
pending: '',
|
119 |
+
init: function() {
|
120 |
+
$('#wp-admin-bar-debug-bar').click( function(e) {
|
121 |
+
e.preventDefault();
|
122 |
+
api.toggle.visibility();
|
123 |
+
});
|
124 |
+
},
|
125 |
+
visibility: function( show ){
|
126 |
+
show = typeof show == 'undefined' ? debugBar.is(':hidden') : show;
|
127 |
|
128 |
debugBar.toggle( show );
|
129 |
$(this).toggleClass( 'active', show );
|
130 |
|
131 |
+
if ( show ) {
|
132 |
+
bounds.update( api.toggle.pending );
|
133 |
+
api.toggle.pending = '';
|
134 |
+
} else {
|
135 |
bounds.restore();
|
136 |
+
}
|
137 |
+
api.cookie.update();
|
138 |
+
}
|
139 |
},
|
140 |
|
141 |
tabs: function(){
|
159 |
// The hashed component of the href is the id that we want to display.
|
160 |
$('#' + this.href.substr( this.href.indexOf( '#' ) + 1 ) ).show();
|
161 |
});
|
162 |
+
},
|
163 |
+
|
164 |
+
actions: {
|
165 |
+
height: 0,
|
166 |
+
overflow: 'auto',
|
167 |
+
buttons: {},
|
168 |
+
|
169 |
+
init: function() {
|
170 |
+
var actions = $('#debug-bar-actions');
|
171 |
+
|
172 |
+
api.actions.height = debugBar.height();
|
173 |
+
api.actions.overflow = api.spacer.css( 'overflow' );
|
174 |
+
|
175 |
+
api.actions.buttons.max = $('.plus', actions).click( api.actions.maximize );
|
176 |
+
api.actions.buttons.res = $('.minus', actions).click( api.actions.restore );
|
177 |
+
},
|
178 |
+
maximize: function() {
|
179 |
+
api.actions.height = debugBar.height();
|
180 |
+
api.spacer.css( 'overflow', 'hidden' );
|
181 |
+
bounds.update( 'auto' );
|
182 |
+
api.actions.buttons.max.hide();
|
183 |
+
api.actions.buttons.res.show();
|
184 |
+
debugBar.dockable('disable');
|
185 |
+
},
|
186 |
+
restore: function() {
|
187 |
+
api.spacer.css( 'overflow', api.actions.overflow );
|
188 |
+
bounds.update( api.actions.height );
|
189 |
+
api.actions.buttons.res.hide();
|
190 |
+
api.actions.buttons.max.show();
|
191 |
+
debugBar.dockable('enable');
|
192 |
+
}
|
193 |
}
|
194 |
};
|
195 |
|
js/debug-bar.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(c){var
|
1 |
+
var wpDebugBar;(function(c){var d,b,a,e;b={adminBarHeight:0,minHeight:0,marginBottom:0,inUpper:function(){return d.offset().top-e.scrollTop()>=b.adminBarHeight},inLower:function(){return d.outerHeight()>=b.minHeight&&e.height()>=b.minHeight},update:function(f){if(typeof f=="number"||f=="auto"){d.height(f)}if(!b.inUpper()||f=="upper"){d.height(e.height()-b.adminBarHeight)}if(!b.inLower()||f=="lower"){d.height(b.minHeight)}a.spacer.css("margin-bottom",d.height()+b.marginBottom)},restore:function(){a.spacer.css("margin-bottom",b.marginBottom)}};wpDebugBar=a={spacer:undefined,init:function(){d=c("#querylist");e=c(window);a.spacer=c(".wp-admin #footer");if(!a.spacer.length){a.spacer=c(document.body)}b.minHeight=c("#debug-bar-handle").outerHeight()+c("#debug-bar-menu").outerHeight();b.adminBarHeight=c("#wpadminbar").outerHeight();b.marginBottom=parseInt(a.spacer.css("margin-bottom"),10);a.dock();a.toggle.init();a.tabs();a.actions.init();a.cookie.restore()},cookie:{get:function(){var f=wpCookies.getHash("wp-debug-bar-"+userSettings.uid);if(!f){return}f.visible=f.visible=="true";f.height=parseInt(f.height,10);return f},update:function(){var g="wp-debug-bar-"+userSettings.uid,f=new Date(),i=userSettings.url,h={visible:d.is(":visible"),height:d.height()};f.setTime(f.getTime()+31536000000);wpCookies.setHash(g,h,f,i)},restore:function(){var f=a.cookie.get();if(!f){return}a.toggle.pending=f.height;a.toggle.visibility(f.visible)}},dock:function(){d.dockable({handle:"#debug-bar-handle",resize:function(g,f){return b.inUpper()&&b.inLower()},resized:function(g,f){b.update()},stop:function(g,f){a.cookie.update()}});e.resize(function(){if(d.is(":visible")&&!d.dockable("option","disabled")){b.update()}})},toggle:{pending:"",init:function(){c("#wp-admin-bar-debug-bar").click(function(f){f.preventDefault();a.toggle.visibility()})},visibility:function(f){f=typeof f=="undefined"?d.is(":hidden"):f;d.toggle(f);c(this).toggleClass("active",f);if(f){b.update(a.toggle.pending);a.toggle.pending=""}else{b.restore()}a.cookie.update()}},tabs:function(){var g=c(".debug-menu-link"),f=c(".debug-menu-target");g.click(function(i){var h=c(this);i.preventDefault();if(h.hasClass("current")){return}f.hide();g.removeClass("current");h.addClass("current");c("#"+this.href.substr(this.href.indexOf("#")+1)).show()})},actions:{height:0,overflow:"auto",buttons:{},init:function(){var f=c("#debug-bar-actions");a.actions.height=d.height();a.actions.overflow=a.spacer.css("overflow");a.actions.buttons.max=c(".plus",f).click(a.actions.maximize);a.actions.buttons.res=c(".minus",f).click(a.actions.restore)},maximize:function(){a.actions.height=d.height();a.spacer.css("overflow","hidden");b.update("auto");a.actions.buttons.max.hide();a.actions.buttons.res.show();d.dockable("disable")},restore:function(){a.spacer.css("overflow",a.actions.overflow);b.update(a.actions.height);a.actions.buttons.res.hide();a.actions.buttons.max.show();d.dockable("enable")}}};c(document).ready(wpDebugBar.init)})(jQuery);
|
js/ui-dockable.dev.js
CHANGED
@@ -25,7 +25,7 @@
|
|
25 |
|
26 |
this._mouseInit();
|
27 |
},
|
28 |
-
|
29 |
return {
|
30 |
element: this.element,
|
31 |
handle: this.handle,
|
@@ -33,20 +33,24 @@
|
|
33 |
};
|
34 |
},
|
35 |
_mouseStart: function(event) {
|
|
|
36 |
this.d0 = this.element[this.dimension]() + event[this.page];
|
37 |
},
|
38 |
_mouseDrag: function(event) {
|
39 |
-
var resize = this._trigger( "resize", event, this.
|
40 |
|
41 |
// If the resize event returns false, we don't resize.
|
42 |
if ( resize === false )
|
43 |
return;
|
44 |
|
45 |
this.element[this.dimension]( this.d0 - event[this.page] );
|
46 |
-
this._trigger( "resized", event, this.
|
47 |
},
|
48 |
_mouseCapture: function(event) {
|
49 |
return !this.options.disabled && event.target == this.handle[0];
|
|
|
|
|
|
|
50 |
}
|
51 |
});
|
52 |
})(jQuery);
|
25 |
|
26 |
this._mouseInit();
|
27 |
},
|
28 |
+
_handoff: function() {
|
29 |
return {
|
30 |
element: this.element,
|
31 |
handle: this.handle,
|
33 |
};
|
34 |
},
|
35 |
_mouseStart: function(event) {
|
36 |
+
this._trigger( "start", event, this._handoff() );
|
37 |
this.d0 = this.element[this.dimension]() + event[this.page];
|
38 |
},
|
39 |
_mouseDrag: function(event) {
|
40 |
+
var resize = this._trigger( "resize", event, this._handoff() );
|
41 |
|
42 |
// If the resize event returns false, we don't resize.
|
43 |
if ( resize === false )
|
44 |
return;
|
45 |
|
46 |
this.element[this.dimension]( this.d0 - event[this.page] );
|
47 |
+
this._trigger( "resized", event, this._handoff() );
|
48 |
},
|
49 |
_mouseCapture: function(event) {
|
50 |
return !this.options.disabled && event.target == this.handle[0];
|
51 |
+
},
|
52 |
+
_mouseStop: function(event) {
|
53 |
+
this._trigger( "stop", event, this._handoff() );
|
54 |
}
|
55 |
});
|
56 |
})(jQuery);
|
js/ui-dockable.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
(function(a){a.widget("db.dockable",a.ui.mouse,{options:{handle:false,axis:"y",resize:function(){},resized:function(){}},_create:function(){if(this.options.axis=="x"){this.page="pageX";this.dimension="width"}else{this.page="pageY";this.dimension="height"}if(!this.options.handle){return}this.handle=a(this.options.handle);this._mouseInit()},
|
1 |
+
(function(a){a.widget("db.dockable",a.ui.mouse,{options:{handle:false,axis:"y",resize:function(){},resized:function(){}},_create:function(){if(this.options.axis=="x"){this.page="pageX";this.dimension="width"}else{this.page="pageY";this.dimension="height"}if(!this.options.handle){return}this.handle=a(this.options.handle);this._mouseInit()},_handoff:function(){return{element:this.element,handle:this.handle,axis:this.options.axis}},_mouseStart:function(b){this._trigger("start",b,this._handoff());this.d0=this.element[this.dimension]()+b[this.page]},_mouseDrag:function(c){var b=this._trigger("resize",c,this._handoff());if(b===false){return}this.element[this.dimension](this.d0-c[this.page]);this._trigger("resized",c,this._handoff())},_mouseCapture:function(b){return !this.options.disabled&&b.target==this.handle[0]},_mouseStop:function(b){this._trigger("stop",b,this._handoff())}})})(jQuery);
|
panels/class-debug-bar-deprecated.php
CHANGED
@@ -7,7 +7,7 @@ class Debug_Bar_Deprecated extends Debug_Bar_Panel {
|
|
7 |
var $deprecated_arguments = array();
|
8 |
|
9 |
function init() {
|
10 |
-
$this->title( __('Deprecated') );
|
11 |
|
12 |
add_action( 'deprecated_function_run', array( &$this, 'deprecated_function_run' ), 10, 3 );
|
13 |
add_action( 'deprecated_file_included', array( &$this, 'deprecated_file_included' ), 10, 4 );
|
@@ -62,9 +62,9 @@ class Debug_Bar_Deprecated extends Debug_Bar_Panel {
|
|
62 |
$file = $backtrace[ $bt ]['file'];
|
63 |
$line = $backtrace[ $bt ]['line'];
|
64 |
if ( ! is_null($replacement) )
|
65 |
-
$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement );
|
66 |
else
|
67 |
-
$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version );
|
68 |
|
69 |
$this->deprecated_functions[$file.':'.$line] = $message;
|
70 |
}
|
@@ -76,9 +76,9 @@ class Debug_Bar_Deprecated extends Debug_Bar_Panel {
|
|
76 |
$line = $backtrace[4]['line'];
|
77 |
$message = empty( $message ) ? '' : ' ' . $message;
|
78 |
if ( ! is_null( $replacement ) )
|
79 |
-
$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file_abs, $version, $replacement ) . $message;
|
80 |
else
|
81 |
-
$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file_abs, $version ) . $message;
|
82 |
|
83 |
$this->deprecated_files[$file.':'.$line] = $message;
|
84 |
}
|
7 |
var $deprecated_arguments = array();
|
8 |
|
9 |
function init() {
|
10 |
+
$this->title( __('Deprecated', 'debug-bar') );
|
11 |
|
12 |
add_action( 'deprecated_function_run', array( &$this, 'deprecated_function_run' ), 10, 3 );
|
13 |
add_action( 'deprecated_file_included', array( &$this, 'deprecated_file_included' ), 10, 4 );
|
62 |
$file = $backtrace[ $bt ]['file'];
|
63 |
$line = $backtrace[ $bt ]['line'];
|
64 |
if ( ! is_null($replacement) )
|
65 |
+
$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 'debug-bar'), $function, $version, $replacement );
|
66 |
else
|
67 |
+
$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 'debug-bar'), $function, $version );
|
68 |
|
69 |
$this->deprecated_functions[$file.':'.$line] = $message;
|
70 |
}
|
76 |
$line = $backtrace[4]['line'];
|
77 |
$message = empty( $message ) ? '' : ' ' . $message;
|
78 |
if ( ! is_null( $replacement ) )
|
79 |
+
$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', 'debug-bar'), $file_abs, $version, $replacement ) . $message;
|
80 |
else
|
81 |
+
$message = sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', 'debug-bar'), $file_abs, $version ) . $message;
|
82 |
|
83 |
$this->deprecated_files[$file.':'.$line] = $message;
|
84 |
}
|
panels/class-debug-bar-object-cache.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
class Debug_Bar_Object_Cache extends Debug_Bar_Panel {
|
4 |
function init() {
|
5 |
-
$this->title( __('Object Cache') );
|
6 |
}
|
7 |
|
8 |
function prerender() {
|
2 |
|
3 |
class Debug_Bar_Object_Cache extends Debug_Bar_Panel {
|
4 |
function init() {
|
5 |
+
$this->title( __('Object Cache', 'debug-bar') );
|
6 |
}
|
7 |
|
8 |
function prerender() {
|
panels/class-debug-bar-php.php
CHANGED
@@ -9,7 +9,7 @@ class Debug_Bar_PHP extends Debug_Bar_Panel {
|
|
9 |
if ( ! WP_DEBUG )
|
10 |
return false;
|
11 |
|
12 |
-
$this->title( __('Notices / Warnings') );
|
13 |
|
14 |
$this->real_error_handler = set_error_handler( array( &$this, 'error_handler' ) );
|
15 |
}
|
9 |
if ( ! WP_DEBUG )
|
10 |
return false;
|
11 |
|
12 |
+
$this->title( __('Notices / Warnings', 'debug-bar') );
|
13 |
|
14 |
$this->real_error_handler = set_error_handler( array( &$this, 'error_handler' ) );
|
15 |
}
|
panels/class-debug-bar-queries.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
class Debug_Bar_Queries extends Debug_Bar_Panel {
|
4 |
function init() {
|
5 |
-
$this->title( __('Queries') );
|
6 |
}
|
7 |
|
8 |
function prerender() {
|
@@ -20,9 +20,9 @@ class Debug_Bar_Queries extends Debug_Bar_Panel {
|
|
20 |
$show_many = isset($_GET['debug_queries']);
|
21 |
|
22 |
if ( $wpdb->num_queries > 500 && !$show_many )
|
23 |
-
$out .= "<p>" . sprintf( __('There are too many queries to show easily! <a href="%s">Show them anyway</a>'), add_query_arg( 'debug_queries', 'true' ) ) . "</p>";
|
24 |
|
25 |
-
$out .= '<ol
|
26 |
$first_query = 0;
|
27 |
$counter = 0;
|
28 |
|
@@ -44,7 +44,7 @@ class Debug_Bar_Queries extends Debug_Bar_Panel {
|
|
44 |
}
|
45 |
$out .= '</ol>';
|
46 |
} else {
|
47 |
-
$out .= "<p><strong>" . __('There are no queries on this page.') . "</strong></p>";
|
48 |
}
|
49 |
|
50 |
$query_count = '<h2><span>Total Queries:</span>' . number_format( $wpdb->num_queries ) . "</h2>\n";
|
2 |
|
3 |
class Debug_Bar_Queries extends Debug_Bar_Panel {
|
4 |
function init() {
|
5 |
+
$this->title( __('Queries', 'debug-bar') );
|
6 |
}
|
7 |
|
8 |
function prerender() {
|
20 |
$show_many = isset($_GET['debug_queries']);
|
21 |
|
22 |
if ( $wpdb->num_queries > 500 && !$show_many )
|
23 |
+
$out .= "<p>" . sprintf( __('There are too many queries to show easily! <a href="%s">Show them anyway</a>', 'debug-bar'), add_query_arg( 'debug_queries', 'true' ) ) . "</p>";
|
24 |
|
25 |
+
$out .= '<ol class="wpd-queries">';
|
26 |
$first_query = 0;
|
27 |
$counter = 0;
|
28 |
|
44 |
}
|
45 |
$out .= '</ol>';
|
46 |
} else {
|
47 |
+
$out .= "<p><strong>" . __('There are no queries on this page.', 'debug-bar') . "</strong></p>";
|
48 |
}
|
49 |
|
50 |
$query_count = '<h2><span>Total Queries:</span>' . number_format( $wpdb->num_queries ) . "</h2>\n";
|
panels/class-debug-bar-request.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
class Debug_Bar_Request extends Debug_Bar_Panel {
|
4 |
function init() {
|
5 |
-
$this->title( __('Request') );
|
6 |
}
|
7 |
|
8 |
function prerender() {
|
2 |
|
3 |
class Debug_Bar_Request extends Debug_Bar_Panel {
|
4 |
function init() {
|
5 |
+
$this->title( __('Request', 'debug-bar') );
|
6 |
}
|
7 |
|
8 |
function prerender() {
|
panels/class-debug-bar-wp-query.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
class Debug_Bar_WP_Query extends Debug_Bar_Panel {
|
4 |
function init() {
|
5 |
-
$this->title( __('WP Query') );
|
6 |
}
|
7 |
|
8 |
function prerender() {
|
@@ -11,6 +11,9 @@ class Debug_Bar_WP_Query extends Debug_Bar_Panel {
|
|
11 |
|
12 |
function render() {
|
13 |
global $template, $wp_query;
|
|
|
|
|
|
|
14 |
|
15 |
echo "<div id='debug-bar-wp-query'>";
|
16 |
echo '<h2><span>Queried Object ID:</span>' . get_queried_object_id() . "</h2>\n";
|
@@ -62,6 +65,9 @@ class Debug_Bar_WP_Query extends Debug_Bar_Panel {
|
|
62 |
echo '<h2><span>Page on Front:</span>' . $page_on_front . "</h2>\n";
|
63 |
}
|
64 |
|
|
|
|
|
|
|
65 |
echo '<div class="clear"></div>';
|
66 |
|
67 |
if ( empty($wp_query->query) )
|
@@ -77,11 +83,10 @@ class Debug_Bar_WP_Query extends Debug_Bar_Panel {
|
|
77 |
echo '<p>' . esc_html( $wp_query->request ) . '</p>';
|
78 |
}
|
79 |
|
80 |
-
|
81 |
-
if ( ! is_null( $object ) ) {
|
82 |
echo '<h3>Queried Object:</h3>';
|
83 |
echo '<ol class="debug-bar-wp-query-list">';
|
84 |
-
foreach ($
|
85 |
echo '<li>' . $key . ' => ' . $value . '</li>';
|
86 |
}
|
87 |
echo '</ol>';
|
2 |
|
3 |
class Debug_Bar_WP_Query extends Debug_Bar_Panel {
|
4 |
function init() {
|
5 |
+
$this->title( __('WP Query', 'debug-bar') );
|
6 |
}
|
7 |
|
8 |
function prerender() {
|
11 |
|
12 |
function render() {
|
13 |
global $template, $wp_query;
|
14 |
+
$queried_object = get_queried_object();
|
15 |
+
if ( $queried_object && isset( $queried_object->post_type ) )
|
16 |
+
$post_type_object = get_post_type_object( $queried_object->post_type );
|
17 |
|
18 |
echo "<div id='debug-bar-wp-query'>";
|
19 |
echo '<h2><span>Queried Object ID:</span>' . get_queried_object_id() . "</h2>\n";
|
65 |
echo '<h2><span>Page on Front:</span>' . $page_on_front . "</h2>\n";
|
66 |
}
|
67 |
|
68 |
+
if ( isset( $post_type_object ) )
|
69 |
+
echo '<h2><span>Post Type:</span>' . $post_type_object->labels->singular_name . "</h2>\n";
|
70 |
+
|
71 |
echo '<div class="clear"></div>';
|
72 |
|
73 |
if ( empty($wp_query->query) )
|
83 |
echo '<p>' . esc_html( $wp_query->request ) . '</p>';
|
84 |
}
|
85 |
|
86 |
+
if ( ! is_null( $queried_object ) ) {
|
|
|
87 |
echo '<h3>Queried Object:</h3>';
|
88 |
echo '<ol class="debug-bar-wp-query-list">';
|
89 |
+
foreach ($queried_object as $key => $value) {
|
90 |
echo '<li>' . $key . ' => ' . $value . '</li>';
|
91 |
}
|
92 |
echo '</ol>';
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: wordpressdotorg, ryan, westi, koopersmith
|
3 |
Tags: debug
|
4 |
Tested up to: 3.1
|
5 |
-
Stable tag: 0.
|
6 |
Requires at least: 3.1
|
7 |
|
8 |
Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
|
@@ -17,8 +17,16 @@ When WP_DEBUG is enabled it also tracks PHP Warnings and Notices to make them ea
|
|
17 |
|
18 |
When SAVEQUERIES is enabled the mysql queries are tracked and displayed.
|
19 |
|
|
|
|
|
20 |
== Upgrade Notice ==
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
= 0.5 =
|
23 |
New UI
|
24 |
Backend rewritten with a class for each panel
|
@@ -45,6 +53,12 @@ Initial Release
|
|
45 |
|
46 |
== Changelog ==
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
= 0.5 =
|
49 |
New UI
|
50 |
Backend rewritten with a class for each panel
|
2 |
Contributors: wordpressdotorg, ryan, westi, koopersmith
|
3 |
Tags: debug
|
4 |
Tested up to: 3.1
|
5 |
+
Stable tag: 0.6
|
6 |
Requires at least: 3.1
|
7 |
|
8 |
Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
|
17 |
|
18 |
When SAVEQUERIES is enabled the mysql queries are tracked and displayed.
|
19 |
|
20 |
+
Add a PHP/MySQL console with the [Debug Bar Console plugin](http://wordpress.org/extend/plugins/debug-bar-console/).
|
21 |
+
|
22 |
== Upgrade Notice ==
|
23 |
|
24 |
+
= 0.6 =
|
25 |
+
Added maximize/restore button
|
26 |
+
Added cookie to keep track of debug bar state
|
27 |
+
Added post type information to WP_Query tab
|
28 |
+
Bug fix where bottom of page was obscured in the admin
|
29 |
+
|
30 |
= 0.5 =
|
31 |
New UI
|
32 |
Backend rewritten with a class for each panel
|
53 |
|
54 |
== Changelog ==
|
55 |
|
56 |
+
= 0.6 =
|
57 |
+
Added maximize/restore button
|
58 |
+
Added cookie to keep track of debug bar state
|
59 |
+
Added post type information to WP_Query tab
|
60 |
+
Bug fix where bottom of page was obscured in the admin
|
61 |
+
|
62 |
= 0.5 =
|
63 |
New UI
|
64 |
Backend rewritten with a class for each panel
|