Adds a group to a toolbar menu node.
Groups can be used to organize toolbar items into distinct sections of a toolbar menu.
$argsarrayrequired
id stringparent string'root'.meta array'class', 'onclick', 'target', and 'title'.$wp_admin_bar global object, which may not exist except during the ‘admin_bar_menu‘ or ‘wp_before_admin_bar_render‘ hooks.final public function add_group( $args ) {
$args['group'] = true;
$this->add_node( $args );
}
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_admin_bar/add_group