wp_admin_bar_sidebar_toggle( WP_Admin_Bar $wp_admin_bar )

Add the sidebar toggle button.


Description Description


Parameters Parameters

$wp_admin_bar

(WP_Admin_Bar) (Required)


Top ↑

Source Source

File: wp-includes/admin-bar.php

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'  => '#',
		) );
	}
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.8.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.