[wp-trac] [WordPress Trac] #20161: Move Toolbar rendering in the admin to the header

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 30 14:41:56 UTC 2012


#20161: Move Toolbar rendering in the admin to the header
-------------------------+---------------------
 Reporter:  nacin        |       Owner:  nacin
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  3.4
Component:  Toolbar      |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:               |
-------------------------+---------------------

Comment (by nacin):

 Replying to [comment:4 johnbillion]:
 > Bah. This breaks a debugging plugin of mine which outputs page
 generation time/queries/etc in a toolbar menu.

 That data is going to be inaccurate anyway, as the pageload wasn't allowed
 to finish before collecting that data.

 Locally, I use this:
 {{{
 add_action( 'shutdown', function() {
         if ( ! did_action( 'admin_footer' ) )
                 return;
         $text = round( memory_get_peak_usage() / 1024 / 1024, 3 ) . ' MB /
 ' . timer_stop() . ' sec';
         echo "\n<script>(function($){ $('#wp-admin-bar-debug-
 bar').find('div').text('$text'); })(jQuery);</script>\n";
 }, 1 );
 }}}

 ----

 http://plugins.trac.wordpress.org/changeset/525389/debug-bar/

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20161#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list