WordPress at Your Fingertips
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 from 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_8960', 10, 2 );
function filter_function_name_8960( $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 113
$nav_menu = apply_filters( 'pre_wp_nav_menu', null, $args );

Where in WP core the hook is used WordPress

Usage not found.