wpseek.com
A WordPress-centric search engine for devs and theme authors



pre_wp_setup_nav_menu_item › WordPress Filter Hooks

Since6.3.0
Deprecatedn/a
apply_filters( 'pre_wp_setup_nav_menu_item', null, $menu_item )
Parameters: (2)
  • (object|null) $modified_menu_item Modified menu item. Default null.
    Required: Yes
  • (object) $menu_item The menu item to modify.
    Required: Yes
Defined at:
Codex:

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

Returning a non-null value from the filter will short-circuit wp_setup_nav_menu_item(), returning that value instead.





Source

$pre_menu_item = apply_filters( 'pre_wp_setup_nav_menu_item', null, $menu_item );