[wp-trac] [WordPress Trac] #19280: Admin bar not displaying until after plugin upgrades/updates/installations are complete

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 17 20:18:41 UTC 2011


#19280: Admin bar not displaying until after plugin upgrades/updates/installations
are complete
-------------------------+------------------------------
 Reporter:  griffinjt    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Admin Bar    |     Version:  3.1
 Severity:  minor        |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by griffinjt):

 Just tested this on the plugin install page for my automatic plugin
 activation class and there were no issues with moving the admin bar to the
 header within a method hooked into init. Admin bar displayed fine and
 worked fine as well. I can't say it will do this for all pages, but for
 now I'm happy. :)

 It just looks like this:


 {{{
 if ( $this->is_tgmpa_page() ) {
         remove_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
         remove_action( 'admin_footer', 'wp_admin_bar_render', 1000 );
         add_action( 'wp_head', 'wp_admin_bar_render', 1000 );
         add_action( 'admin_head', 'wp_admin_bar_render', 1000 );
 }
 }}}

 I didn't see any issues when testing it on other pages like plugins.php,
 but it was just a cursory review.

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


More information about the wp-trac mailing list