WP_Admin_Bar::add_group( array $args )
- Since
- 3.3.0
- Source
wp-includes/class-wp-admin-bar.php:271
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
$argsarray- Array of arguments for adding a group.
$idstringID of the item.$parentstringdefault: 'root'Optional. ID of the parent node.$metaarrayMeta data for the group including the following keys: 'class', 'onclick', 'target', and 'title'.
Uses · 1
- WP_Admin_Bar::add_node()Adds a node to the menu.
Source
final public function add_group( $args ) { $args['group'] = true; $this->add_node( $args ); }History
Introduced in 3.3.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, from
src/wp-includes/class-wp-admin-bar.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it. - Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.