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.
Source
File: wp-includes/class-wp-admin-bar.php
public function remove_menu( $id ) { $this->remove_node( $id ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |