Home/Hooks/admin_bar_menu
ACTION

admin_bar_menu

Loads all necessary admin bar items. This hook can add, remove, or manipulate admin bar items. The priority determines the placement for new items, and changes to existing items would require a high priority. To remove or manipulate existing nodes without a specific priority, use `wp_before_admin_bar_render`.

wp-includes/admin-bar.php
Line 97
1 Parameter
View Source

Usage

add_action( 'admin_bar_menu', 'your_callback_function', 10, 1 );

Action Callback:

function your_callback_function( array(&$wp_admin_bar) ) {
    // Your code here
    
}

Parameters

array(&$wp_admin_bar)

Parameter 1

⚡ Action Hook

Action hooks allow you to insert custom code at specific points during WordPress execution. Actions do not return any values.