Ticket #15723 (closed feature request: fixed)
admin_bar_menu Hook Pass Back Admin Bar Instance
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Menus | Version: | 3.1 |
| Severity: | minor | Keywords: | has-patch |
| Cc: |
Description
Would it not be handy to pass back the instance $wp_admin_bar in the do_action() call, if anything to save a lot of global calls?
do_action_ref_array( 'admin_bar_menu', array(&$wp_admin_bar) );
Attachments
Change History
comment:3
JohnPBloch — 18 months ago
- Keywords has-patch added
Using do_action_ref_array() as TheDeadMedic suggested works fine. If the callback doesn't take an argument this will still work (and the object will still be accessible by using func_get_args()).
Note: See
TracTickets for help on using
tickets.

