Filter hook 'pre_wp_nav_menu'
in WP Core File wp-includes/nav-menu-template.php at line 113
Description
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.
Occurrences
Filename |
Line Number |
wp-includes/nav-menu-template.php |
113 |
Parameters
Type |
Name |
Description |
string|null |
$output |
Nav menu output to short-circuit with. Default null. |
stdClass |
$args |
An object containing wp_nav_menu() arguments. |
PHP Doc
/**
* 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.
*
* @since 3.9.0
*
* @see wp_nav_menu()
*
* @param string|null $output Nav menu output to short-circuit with. Default null.
* @param stdClass $args An object containing wp_nav_menu() arguments.
*/