apply_filters( 'wp_get_nav_menus', \WP_Term[] $menus, array $args )
- Since
- 3.0.0
Filters the navigation menu objects being returned.
Compatibility
- WordPress
- since 3.0.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$argsarray- An array of arguments used to retrieve menu objects.
Where this hook fires · 1
wp-includes/nav-menu.php:665wp_get_nav_menus()
Source code
* * @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 );} /** * Determines whether a menu item is valid. * * @link https://core.trac.wordpress.org/ticket/13958Changelog
Introduced in 3.0.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.