Skip to content

Commit 64c5f63

Browse files
committed
Update Debug Bar plugin from 1.1.7 to 1.1.8
1 parent e84d7ec commit 64c5f63

6 files changed

Lines changed: 119 additions & 113 deletions

File tree

wp-content/plugins/debug-bar/debug-bar.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
22
/*
33
Plugin Name: Debug Bar
4-
Plugin URI: https://wordpress.org/plugins/debug-bar/
4+
Plugin URI: https://wordpress.org/plugins/debug-bar/
55
Description: Adds a debug menu to the admin bar that shows query, cache, and other helpful debugging information.
6-
Author: wordpressdotorg
7-
Version: 1.1.7
8-
Author URI: https://wordpress.org/
6+
Author: wordpressdotorg
7+
Version: 1.1.8
8+
Author URI: https://wordpress.org/
99
Text Domain: debug-bar
10+
License: GPLv2 or later
1011
*/
1112

1213
/***

wp-content/plugins/debug-bar/js/debug-bar.dev.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var wpDebugBar;
2323

2424
toggle: {
2525
init: function init() {
26-
$( '#wp-admin-bar-debug-bar' ).click( function onClickAdminBarMenu( event ) {
26+
$( '#wp-admin-bar-debug-bar' ).on( 'click', function onClickAdminBarMenu( event ) {
2727
event.preventDefault();
2828

2929
// Click on submenu item.
@@ -66,7 +66,7 @@ var wpDebugBar;
6666
var debugMenuLinks = $( '.debug-menu-link' ),
6767
debugMenuTargets = $( '.debug-menu-target' );
6868

69-
debugMenuLinks.click( function onClickLink( event ) {
69+
debugMenuLinks.on( 'click', function onClickLink( event ) {
7070
var $this = $( this );
7171

7272
event.preventDefault();
@@ -91,18 +91,18 @@ var wpDebugBar;
9191
var actions = $( '#debug-bar-actions' );
9292

9393
// Close the panel with the esc key if it's open.
94-
$( document ).keydown( function maybeClosePanel( event ) {
94+
$( document ).on( 'keydown', function maybeClosePanel( event ) {
9595
var key = event.key || event.which || event.keyCode;
9696

97-
if ( 27 /* esc */ === key && api.isVisible() ) {
97+
if ( (27 === key || 'Escape' === key) && api.isVisible() ) {
9898
event.preventDefault();
9999
api.actions.close();
100100
}
101101
} );
102102

103-
$( '.maximize', actions ).click( api.actions.maximize );
104-
$( '.restore', actions ).click( api.actions.restore );
105-
$( '.close', actions ).click( api.actions.close );
103+
$( '.maximize', actions ).on( 'click', api.actions.maximize );
104+
$( '.restore', actions ).on( 'click', api.actions.restore );
105+
$( '.close', actions ).on( 'click', api.actions.close );
106106
},
107107
maximize: function maximize() {
108108
api.body.removeClass( 'debug-bar-partial' );

wp-content/plugins/debug-bar/panels/class-debug-bar-deprecated.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ function deprecated_argument_run( $function, $message, $version ) {
130130

131131
if ( ! is_null( $message ) ) {
132132
/* translators: 1: PHP function name, 2: Version number, 3: Optional message regarding the change. */
133-
$message = sprintf( __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s' ), $function, $version, $message );
133+
$message = sprintf( __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', 'debug-bar' ), $function, $version, $message );
134134
} else {
135135
/* translators: 1: PHP function name, 2: Version number. */
136-
$message = sprintf( __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.' ), $function, $version );
136+
$message = sprintf( __( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', 'debug-bar' ), $function, $version );
137137
}
138138

139139
$this->deprecated_arguments[ $location ] = array( $message, wp_debug_backtrace_summary( null, $bt ) );

wp-content/plugins/debug-bar/panels/class-debug-bar-php.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ function error_handler( $type, $message, $file, $line ) {
5656
wp_debug_backtrace_summary( __CLASS__ ),
5757
);
5858
break;
59-
case E_STRICT:
60-
// TODO
61-
break;
6259
case E_DEPRECATED:
6360
case E_USER_DEPRECATED:
6461
// TODO

wp-content/plugins/debug-bar/panels/class-debug-bar-wp-query.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function render() {
1818
}
1919

2020
echo "<div id='debug-bar-wp-query'>";
21-
echo '<h2><span>', __( 'Queried Object ID:', 'debug-bar' ), '</span>', get_queried_object_id(), "</h2>\n";
21+
echo '<h2><span>', __( 'Queried Object ID:', 'debug-bar' ), '</span>', esc_html( get_queried_object_id() ), "</h2>\n";
2222

2323
// Determine the query type. Follows the template loader order.
2424
$type = '';
@@ -53,7 +53,7 @@ function render() {
5353
}
5454

5555
if ( ! empty( $type ) ) {
56-
echo '<h2><span>', __( 'Query Type:', 'debug-bar' ), '</span>', $type, "</h2>\n";
56+
echo '<h2><span>', __( 'Query Type:', 'debug-bar' ), '</span>', esc_html( $type ), "</h2>\n";
5757
}
5858

5959
if ( ! empty( $template ) ) {
@@ -64,14 +64,14 @@ function render() {
6464
$page_on_front = get_option( 'page_on_front' );
6565
$page_for_posts = get_option( 'page_for_posts' );
6666

67-
echo '<h2><span>', __( 'Show on Front:', 'debug-bar' ), '</span>', $show_on_front, "</h2>\n";
67+
echo '<h2><span>', __( 'Show on Front:', 'debug-bar' ), '</span>', esc_html( $show_on_front ), "</h2>\n";
6868
if ( 'page' == $show_on_front ) {
69-
echo '<h2><span>', __( 'Page for Posts:', 'debug-bar' ), '</span>', $page_for_posts, "</h2>\n";
70-
echo '<h2><span>', __( 'Page on Front:', 'debug-bar' ), '</span>', $page_on_front, "</h2>\n";
69+
echo '<h2><span>', __( 'Page for Posts:', 'debug-bar' ), '</span>', esc_html( $page_for_posts ), "</h2>\n";
70+
echo '<h2><span>', __( 'Page on Front:', 'debug-bar' ), '</span>', esc_html( $page_on_front ), "</h2>\n";
7171
}
7272

7373
if ( isset( $post_type_object ) ) {
74-
echo '<h2><span>', __( 'Post Type:', 'debug-bar' ), '</span>', $post_type_object->labels->singular_name, "</h2>\n";
74+
echo '<h2><span>', __( 'Post Type:', 'debug-bar' ), '</span>', esc_html( $post_type_object->labels->singular_name ), "</h2>\n";
7575
}
7676

7777
echo '<div class="clear"></div>';
@@ -106,11 +106,11 @@ function render() {
106106
protected function _recursive_print_kv( $kv_array ) {
107107
foreach ( $kv_array as $key => $value ) {
108108
if ( is_object( $value ) || is_array( $value ) ) {
109-
echo '<tr><th>', $key, '</th> <td>&rArr;</td> <td>';
109+
echo '<tr><th>', esc_html( $key ), '</th> <td>&rArr;</td> <td>';
110110
$this->_recursive_print_kv( $value );
111111
echo '</td></tr>';
112112
} else {
113-
echo '<tr><th>', $key, '</th> <td>&rArr;</td> <td>', $value, '</td></tr>';
113+
echo '<tr><th>', esc_html( $key ), '</th> <td>&rArr;</td> <td>', esc_html( $value ), '</td></tr>';
114114
}
115115
}
116116
}

0 commit comments

Comments
 (0)