wp_admin_bar_add_secondary_groups

Add secondary menus.

Description

wp_admin_bar_add_secondary_groups( (WP_Admin_Bar) $wp_admin_bar ); 

Parameters (1)

0. $wp_admin_bar (WP_Admin_Bar)
The wp admin bar.

Usage

  1. if ( !function_exists( 'wp_admin_bar_add_secondary_groups' ) ) { 
  2. require_once ABSPATH . WPINC . '/admin-bar.php'; 
  3.  
  4. // The wp admin bar. 
  5. $wp_admin_bar = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_admin_bar_add_secondary_groups($wp_admin_bar); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/admin-bar.php  
  1. function wp_admin_bar_add_secondary_groups( $wp_admin_bar ) { 
  2. $wp_admin_bar->add_group( array( 
  3. 'id' => 'top-secondary',  
  4. 'meta' => array( 
  5. 'class' => 'ab-top-secondary',  
  6. ),  
  7. ) ); 
  8.  
  9. $wp_admin_bar->add_group( array( 
  10. 'parent' => 'wp-logo',  
  11. 'id' => 'wp-logo-external',  
  12. 'meta' => array( 
  13. 'class' => 'ab-sub-secondary',  
  14. ),  
  15. ) );