WordPress at a glance
filter is not described

pre_wp_nav_menu filter-hook . WP 3.9.0

Filters whether to short-circuit the wp_nav_menu() output.

Returning a non-null value to the filter will short-circuit wp_nav_menu(), echoing that value if $args->echo is true, returning that value otherwise.


add_filter( 'pre_wp_nav_menu', 'filter_function_name_1505', 10, 2 );
function filter_function_name_1505( $output, $args ){
	// filter...

	return $output;
Nav menu output to short-circuit with.
Default: null
An object containing wp_nav_menu() arguments.


Since 3.9.0 Introduced.

Where the hook is called

wp-includes/nav-menu-template.php 104
$nav_menu = apply_filters( 'pre_wp_nav_menu', null, $args );

Where the hook is used (in WP core)

Usage not found!