do_action_ref_array( 'admin_bar_menu', WP_Admin_Bar $wp_admin_bar )
Loads all necessary admin bar items.
Description
This is the hook used to add, remove, or manipulate admin bar items.
Parameters
- $wp_admin_bar
-
(WP_Admin_Bar) The WP_Admin_Bar instance, passed by reference.
Source
Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
This hook is used to add the admin bar menu.
Example:-
Expand full source codeCollapse full source code
Display custom menu only for the admin area and add dropdown menu
Expand full source codeCollapse full source code
This is how you can add admin bar menus to the right side.
Expand full source codeCollapse full source code
Find the order that hooks and filters are called here: https://codex.wordpress.org/Plugin_API/Action_Reference