[wp-trac] [WordPress Trac] #19380: There is no way to specify placement of a new menu item in the Admin Bar
WordPress Trac
wp-trac at lists.automattic.com
Mon Nov 28 16:57:33 UTC 2011
#19380: There is no way to specify placement of a new menu item in the Admin Bar
--------------------------+-----------------------------
Reporter: willshouse | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Admin Bar | Version: 3.3
Severity: minor | Resolution:
Keywords: |
--------------------------+-----------------------------
Comment (by koopersmith):
Replying to [comment:5 willshouse]:
> I can't seem to use these actions to remove the items or reorder them.
What am I doing wrong here?
>
> {{{ add_action( 'wp_before_admin_bar_render', 'admin_bar_test', 2 ); }}}
Your code calls remove action after the {{{admin_bar_menus}}} action has
fired. You can fix your code by attaching your callback to the {{{init}}}
action, or at the latest, an early priority on {{{admin_bar_menus}}}.
----
In the {{{wp_admin_bar_render}}} method, the
{{{wp_before_admin_bar_render}}} action is called after the
{{{admin_bar_menus}}} action. Check out the code here:
http://core.trac.wordpress.org/browser/trunk/wp-includes/admin-
bar.php?rev=19464#L41
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19380#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list