[wp-trac] [WordPress Trac] #28569: Calling show_admin_bar( false ) should dehook toolbar entirely

WordPress Trac noreply at wordpress.org
Tue Jun 17 20:14:17 UTC 2014


#28569: Calling show_admin_bar( false ) should dehook toolbar entirely
-----------------------------+----------------------------------------
 Reporter:  danielbachhuber  |      Owner:
     Type:  enhancement      |     Status:  new
 Priority:  normal           |  Milestone:  Future Release
Component:  Toolbar          |    Version:
 Severity:  normal           |   Keywords:  needs-patch good-first-bug
  Focuses:                   |
-----------------------------+----------------------------------------
 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.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28569>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list