WP_Admin_Bar::add_group( array $args )

Adds a group to a toolbar menu node.


Description

Groups can be used to organize toolbar items into distinct sections of a toolbar menu.


Parameters

$args

(Required) Array of arguments for adding a group.<br>

  • 'id'
    (string) ID of the item.<br>
  • 'parent'
    (string) Optional. ID of the parent node. Default 'root'.<br>
  • 'meta'
    (array) Meta data for the group including the following keys: 'class', 'onclick', 'target', and 'title'.<br>


Source

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

	final public function add_group( $args ) {
		$args['group'] = true;

		$this->add_node( $args );
	}

Changelog

Changelog
Version Description
3.3.0 Introduced.