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
$argsarrayrequired- Array of arguments for adding a group.
idstringID of the item.parentstringOptional. ID of the parent node. Default'root'.metaarrayMeta data for the group including the following keys:'class','onclick','target', and'title'.
Source
final public function add_group( $args ) { $args['group'] = true; $this->add_node( $args ); } Changelog
| Version | Description |
|---|---|
| 3.3.0 | Introduced. |
Adding a group to a parent node
This example adds a parent node, child nodes and a group to the toolbar.
The output from this example in the toolbar will be: