WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#28299 closed enhancement (worksforme)

Admin Bar loading to early in wp-admin

Reported by: mbrandys Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: Administration Keywords:
Focuses: ui, administration Cc:

Description

Today I wanted to debug custom WP_Query that I have made on post edit page (meta box) but when I opened my Debug Bar queries section I was unabled to find it.

It was caused because of admin bar on administartion side is loading in header instead of footer (on front side admin bar is loading in footer).

wp-includes\admin-bar.php

add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );
add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );

I have pushed 'wp_admin_bar_render' function to run in 'in_admin_footer' instead of 'in_admin_header'. It fixed the problem but I noticed it breaks display of admin bar and left menu on smaller screens (width less than 782px) as footer gets hidden.

I was wondering if there are any reason to keep admin bar loading in header on administartion area?

Change History (2)

#1 @johnbillion
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed

Thanks for the report mbrandys.

The reason for this is so the admin bar appears without delay on pages which take longer to render. See #20161 for more info.

#2 @psycleuk
6 years ago

I had the same issue, and tracked it down to fact that the Debug Bar is stuck on version 0.8.1, and the change made as part of http://plugins.trac.wordpress.org/changeset/525389/debug-bar/ is stuck in the trunk version of the plugin and has been for the last two years.

If you svn checkout the trunk version of Debug Bar mbrandys you'll notice that it will go back to working correctly. I've asked if a new version of the plugin can be released ( http://wordpress.org/support/topic/new-version-28?replies=1 )

Note: See TracTickets for help on using tickets.