wpseek.com
A WordPress-centric search engine for devs and theme authors
wp_get_nav_menus › WordPress Function
Since3.0.0
Deprecatedn/a
› wp_get_nav_menus ( $args = array() )
Parameters: |
|
Returns: |
|
Defined at: |
|
Codex: | |
Change Log: |
|
Returns all navigation menu objects.
Related Functions: wp_get_nav_menu_items, wp_get_nav_menu_name, wp_delete_nav_menu, wp_create_nav_menu, wp_nav_menu
Source
function wp_get_nav_menus( $args = array() ) { $defaults = array( 'taxonomy' => 'nav_menu', 'hide_empty' => false, 'orderby' => 'name', ); $args = wp_parse_args( $args, $defaults ); /** * Filters the navigation menu objects being returned. * * @since 3.0.0 * * @see get_terms() * * @param WP_Term[] $menus An array of menu objects. * @param array $args An array of arguments used to retrieve menu objects. */ return apply_filters( 'wp_get_nav_menus', get_terms( $args ), $args ); }