Re: New plugin: Add All Nav Links to BP Adminbar
I may have found some clues here:
http://adambrown.info/p/wp_hooks/hook/wp_get_nav_menus?version=3.0&file=wp-includes/nav-menu.php
And from here:
http://svn.automattic.com/wordpress/tags/3.0/wp-includes/nav-menu.php
… there are these nifty tidbits:
function wp_get_nav_menus( $args = array() ) {
$defaults = array( ‘hide_empty’ => false, ‘orderby’ => ‘none’ );
$args = wp_parse_args( $args, $defaults );
return apply_filters( ‘wp_get_nav_menus’, get_terms( ‘nav_menu’, $args), $args );
}
function get_registered_nav_menus() {
global $_wp_registered_nav_menus;
if ( isset( $_wp_registered_nav_menus ) )
return $_wp_registered_nav_menus;
return array();
}
Looks like these functions should call whatever nav menus are set in the backend in 3.0 but, as I’m still VERY wet behind the ears when it comes to understanding what functions can actually do…