apply_filters( 'pre_wp_nav_menu', string|null $output, stdClass $args )

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

Description Description

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.

Top ↑

See also See also

Top ↑

Parameters Parameters


(string|null) Nav menu output to short-circuit with. Default null.


(stdClass) An object containing wp_nav_menu() arguments.

Top ↑

Source Source

File: wp-includes/nav-menu-template.php

View on Trac

Top ↑

Changelog Changelog

Version Description
3.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.