Make WordPress Core

Opened 7 years ago

Last modified 21 months ago

#28569 reviewing enhancement

Calling show_admin_bar( false ) should dehook toolbar entirely

Reported by: danielbachhuber Owned by: chriscct7
Milestone: Priority: normal
Severity: normal Version:
Component: Toolbar Keywords: good-first-bug has-patch
Focuses: Cc:


Because I'm only hiding the toolbar in certain contexts, I'm calling show_admin_bar( false ) right before get_header(). #16249 was closed suggesting the function should only be called on init. #21746 suggests calling after plugins_loaded However, I think calling it after the query is set and the template is picked is a valid use case.

As such, I'd propose calling show_admin_bar( false ) should run remove_action('wp_head', '_admin_bar_bump_cb'); and similar setup callbacks.

Attachments (1)

28569.patch (428 bytes) - added by paulschreiber 7 years ago.

Download all attachments as: .zip

Change History (5)

#1 @paulschreiber
7 years ago

What other callbacks count as "and similar setup callbacks"?

7 years ago

#2 @helen
6 years ago

  • Keywords has-patch added; needs-patch removed

#3 @DrewAPicture
6 years ago

  • Owner set to paulschreiber
  • Status changed from new to assigned

#4 @chriscct7
5 years ago

  • Owner changed from paulschreiber to chriscct7
  • Status changed from assigned to reviewing
Note: See TracTickets for help on using tickets.