wp_admin_bar_sidebar_toggle( WP_Admin_Bar $wp_admin_bar )

In this article

Adds the sidebar toggle button.

Parameters

$wp_admin_barWP_Admin_Barrequired
The WP_Admin_Bar instance.

Source

function wp_admin_bar_sidebar_toggle( $wp_admin_bar ) {	if ( is_admin() ) {	$wp_admin_bar->add_node(	array(	'id' => 'menu-toggle',	'title' => '<span class="ab-icon" aria-hidden="true"></span><span class="screen-reader-text">' .	/* translators: Hidden accessibility text. */	__( 'Menu' ) .	'</span>',	'href' => '#',	)	);	} } 

Changelog

VersionDescription
3.8.0Introduced.

User Contributed Notes

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