Adds a node (menu item) to the admin bar menu.
Parameters
$node
arrayrequired- The attributes that define the node.
Source
public function add_menu( $node ) {
$this->add_node( $node );
}
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |
CARVIEW |
Adds a node (menu item) to the admin bar menu.
$node
arrayrequiredInitial items in the Admin Bar are($menu_id):
Parameter $node takes an array of arguments:
public function add_menu( $node ) {
$this->add_node( $node );
}
Uses | Description |
---|---|
WP_Admin_Bar::add_node()wp-includes/class-wp-admin-bar.php | Adds a node to the menu. |
Used by | Description |
---|---|
wp_admin_bar_dashboard_view_site_menu()wp-includes/deprecated.php | Add the “Dashboard”/”Visit Site” menu. |
Version | Description |
---|---|
3.3.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
See https://developer.wordpress.org/reference/hooks/admin_bar_menu/ for examples
Since this is practically an alias for `add_node` method, you can find more information, specially about $args, here:
https://developer.wordpress.org/reference/classes/wp_admin_bar/add_node/