wp_admin_bar_add_secondary_groups()WP 3.3.0

Adds secondary menus.

No Hooks.

Return

null. Nothing.

Usage

wp_admin_bar_add_secondary_groups( $wp_admin_bar );
$wp_admin_bar(WP_Admin_Bar) (required)
The WP_Admin_Bar instance.

Changelog

Since 3.3.0 Introduced.

Code of wp_admin_bar_add_secondary_groups() WP 6.0

function wp_admin_bar_add_secondary_groups( $wp_admin_bar ) {
	$wp_admin_bar->add_group(
		array(
			'id'   => 'top-secondary',
			'meta' => array(
				'class' => 'ab-top-secondary',
			),
		)
	);

	$wp_admin_bar->add_group(
		array(
			'parent' => 'wp-logo',
			'id'     => 'wp-logo-external',
			'meta'   => array(
				'class' => 'ab-sub-secondary',
			),
		)
	);
}