wp_admin_bar_add_secondary_groups() WordPress Function
The wp_admin_bar_add_secondary_groups() function is used to add secondary groups to the WordPress admin bar. This function can be used to add groups of links, such as those for a plugin, to the admin bar.
wp_admin_bar_add_secondary_groups( WP_Admin_Bar $wp_admin_bar ) #
Adds secondary menus.
Parameters
- $wp_admin_bar
(WP_Admin_Bar)(Required)The WP_Admin_Bar instance.
Source
File: wp-includes/admin-bar.php
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', ), ) ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |