WP_Admin_Bar::remove_menu() WordPress Method

The WP_Admin_Bar::remove_menu() method can be used to remove a menu item from the WordPress admin bar. This can be useful if you want to remove a menu item that is no longer needed or if you want to remove a default WordPress menu item.

WP_Admin_Bar::remove_menu( string $id ) #

Removes a node from the admin bar.


Parameters

$id

(string)(Required)The menu slug to remove.


Top ↑

Source

File: wp-includes/class-wp-admin-bar.php

	public function remove_menu( $id ) {
		$this->remove_node( $id );
	}


Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.