Opened 15 years ago
Closed 15 years ago
#19280 closed enhancement (duplicate)
Admin bar not displaying until after plugin upgrades/updates/installations are complete
| Reported by: | griffinjt | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Toolbar | Version: | 3.1 |
| Severity: | minor | Keywords: | |
| Cc: | Focuses: |
Description
Couldn't find a ticket for this. The admin bar doesn't display until after any updates, upgrades or installations using plugins_api are complete. It's not terribly important, but it does look odd having blank space there during the process. I've only tested this with plugins, could be the same with core upgrades as well.
Change History (7)
#3
@
15 years ago
Just thinking out loud - maybe it would be possible to bump loading to the top only when certain things are active (like WP_Filesystem, which would get touched anytime updates/upgrades occur). Not even sure if its feasible, but it's my first thought. It may be too late, but just a thought.
#4
@
15 years ago
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Yeah, this has been a problem since 3.1 I believe. The issue is that the admin bar is rendered at the bottom of the page.
We *could* bump rendering to the top on select pages. I don't think it'd break much. The JS wouldn't work though (not that we'd want it to).
Eventually updates should be standardized to occur in an iframe, but it's a challenge.