A WordPress-centric search engine for devs and theme authors



pre_wp_nav_menu ›

Since3.9.0
Deprecatedn/a
apply_filters( 'pre_wp_nav_menu', null, $args )
Parameters: (2)
  • (string|null) $output Nav menu output to short-circuit with. Default null.
    Required: Yes
  • (stdClass) $args An object containing wp_nav_menu() arguments.
    Required: Yes
See:
  • wp_nav_menu()
Defined at:
Codex:

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.





Source

$nav_menu = apply_filters( 'pre_wp_nav_menu', null, $args );