A WordPress-centric search engine for devs and theme authors



wp_admin_bar_sidebar_toggle ›

Since3.8.0
Deprecatedn/a
wp_admin_bar_sidebar_toggle ( $wp_admin_bar )
Parameters:
  • (WP_Admin_Bar) $wp_admin_bar
    Required: Yes
Defined at:
Codex:

Add the sidebar toggle button.



Source

function wp_admin_bar_sidebar_toggle( $wp_admin_bar ) {
	if ( is_admin() ) {
		$wp_admin_bar->add_menu(
			array(
				'id'    => 'menu-toggle',
				'title' => '<span class="ab-icon"></span><span class="screen-reader-text">' . __( 'Menu' ) . '</span>',
				'href'  => '#',
			)
		);
	}
}