function wp_get_nav_menus( $args = array() {}

Returns all navigation menu objects.


  • array $args: Array of arguments passed on to get_terms().

Return values

returns:menu objects

Defined filters

  • wp_get_nav_menus
    apply_filters( 'wp_get_nav_menus', get_terms( 'nav_menu', $args)

Source code

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 );



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: