wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



pre_wp_nav_menu › Hooks de Filtros WordPress

Desde3.9.0
Obsoleton/a
apply_filters( 'pre_wp_nav_menu', null, $args )
Parâmetros: (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
Definido em:
Codex:

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.





Fonte

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