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

WordPress Trac noreply at wordpress.org
Mon Oct 25 14:46:46 UTC 2021


#28569: Calling show_admin_bar( false ) should dehook toolbar entirely
-------------------------------------+----------------------------
 Reporter:  danielbachhuber          |       Owner:  davidbaumwald
     Type:  enhancement              |      Status:  reviewing
 Priority:  normal                   |   Milestone:  5.9
Component:  Toolbar                  |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-refresh  |     Focuses:
-------------------------------------+----------------------------

Comment (by obenland):

 Let's also make sure that it works as expected when set to `true` again
 after.

 {{{#!php
 <?php
 show_admin_bar( false );
 $this->assertFalse( has_action( 'wp_head', '_admin_bar_bump_cb' ) );

 show_admin_bar( true );
 $this->assertEquals( 10, has_action( 'wp_head', '_admin_bar_bump_cb' ) );
 }}}

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


More information about the wp-trac mailing list