[wp-hackers] Recommended way for plugins to add admin bar menus

Peter Westwood peter.westwood at ftwr.co.uk
Thu Dec 2 22:12:53 UTC 2010


On 2 Dec 2010, at 21:39, John Blackbourn wrote:

> What's the recommended way for plugins to add menus to the new admin bar in 3.1?
> 
> Is there a nice wrapper function like the administration menus, or
> should plugins just use the add_menu() method of the global
> $wp_admin_bar object?
> 

Yeah just call add_menu from a suitable hook

Example:

https://plugins.svn.wordpress.org/debug-bar/trunk/debug-bar.php

Cheers
-- 
Peter Westwood
http://blog.ftwr.co.uk | http://westi.wordpress.com
C53C F8FC 8796 8508 88D6 C950 54F4 5DCD A834 01C5



More information about the wp-hackers mailing list