diff --git a/wp-includes/admin-bar/admin-bar-class.php b/wp-includes/admin-bar/admin-bar-class.php index f213d448a2..9fabc41a2b 100644 --- a/wp-includes/admin-bar/admin-bar-class.php +++ b/wp-includes/admin-bar/admin-bar-class.php @@ -11,7 +11,6 @@ class WP_Admin_Bar { /* Only load super admin menu code if the logged in user is a super admin */ if ( is_super_admin() ) { - require( ABSPATH . WPINC . '/admin-bar/admin-bar-debug.php' ); require( ABSPATH . WPINC . '/admin-bar/admin-bar-superadmin.php' ); } diff --git a/wp-includes/admin-bar/admin-bar-debug.php b/wp-includes/admin-bar/admin-bar-debug.php deleted file mode 100644 index 928d0a1b2c..0000000000 --- a/wp-includes/admin-bar/admin-bar-debug.php +++ /dev/null @@ -1,170 +0,0 @@ -num_queries; - $seconds = timer_stop(); - - /* Add the main siteadmin menu item */ - $wp_admin_bar->add_menu( array( 'id' => 'queries', 'title' => "{$queries}q/{$seconds}", 'href' => 'javascript:toggle_query_list()', 'meta' => array( 'class' => 'ab-sadmin' ) ) ); -} -add_action( 'wp_before_admin_bar_render', 'wp_admin_bar_debug_menu', 1000 ); - -function wp_admin_bar_query_debug_list() { - global $wpdb, $wp_object_cache; - - if ( !is_super_admin() ) - return false; - - $debugs = array(); - - if ( defined('SAVEQUERIES') && SAVEQUERIES ) - $debugs['wpdb'] = array( __('Queries'), 'wp_admin_bar_debug_queries' ); - - if ( is_object($wp_object_cache) && method_exists($wp_object_cache, 'stats') ) - $debugs['object-cache'] = array( __('Object Cache'), 'wp_admin_bar_debug_object_cache' ); - - $debugs = apply_filters( 'wp_admin_bar_debugs_list', $debugs ); - - if ( empty($debugs) ) - return; - -?> - -
- -

Debugging blog # on

-
-

-

PHP Version:

-
- - -
- - $debug_output ) : ?> - -
> - -
- - - -
- - - -
- -queries) ) { - $show_many = isset($_GET['debug_queries']); - - if ( $wpdb->num_queries > 500 && !$show_many ) - $out .= "

There are too many queries to show easily! Show them anyway.

"; - - $out .= '
    '; - $first_query = 0; - $counter = 0; - - foreach ( $wpdb->queries as $q ) { - list($query, $elapsed, $debug) = $q; - - $total_time += $elapsed; - - if ( !$show_many && ++$counter > 500 ) - continue; - - $query = nl2br(esc_html($query)); - - // $dbhname, $host, $port, $name, $tcp, $elapsed - $out .= "
  1. $query
    $debug #{$counter} (" . number_format(sprintf('%0.1f', $elapsed * 1000), 1, '.', ',') . "ms)
  2. \n"; - } - $out .= '
'; - } else { - $out .= "

There are no queries on this page, you won the prize!!! :)

"; - } - - $query_count = '

Total Queries:' . number_format( $wpdb->num_queries ) . "

\n"; - $query_time = '

Total query time:' . number_format(sprintf('%0.1f', $total_time * 1000), 1) . "ms

\n"; - $memory_usage = '

Peak Memory Used:' . number_format( memory_get_peak_usage( ) ) . " bytes

\n"; - - $out = $query_count . $query_time . $memory_usage . $out; - - return $out; -} - -function wp_admin_bar_debug_object_cache() { - global $wp_object_cache; - ob_start(); - echo "
"; - $wp_object_cache->stats(); - echo "
"; - $out = ob_get_contents(); - ob_end_clean(); - - return $out; -} - -?>