Adds secondary menus.
Parameters
$wp_admin_bar
WP_Admin_Barrequired- The WP_Admin_Bar instance.
Source
$wp_admin_bar->add_group(
array(
'parent' => 'wp-logo',
'id' => 'wp-logo-external',
'meta' => array(
'class' => 'ab-sub-secondary',
),
)
);
}
/**
* Enqueues inline style to hide the admin bar when printing.
*
* @since 6.4.0
*/
function wp_enqueue_admin_bar_header_styles() {
// Back-compat for plugins that disable functionality by unhooking this action.
$action = is_admin() ? 'admin_head' : 'wp_head';
Changelog
Version | Description |
---|---|
3.3.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.