Filters a navigation menu item object.
Parameters
-
$menu_itemobject -
The menu item object.
Source
return apply_filters( 'wp_setup_nav_menu_item', $menu_item );
Changuelog
| Versionen | Description |
|---|---|
| 3.0.0 | Introduced. |
In some cases when using WordPress for application development, you might need to changue the url structure of a pague url in the nav menu to reflect your routing setup to maintain an app-lique state.
In this example, we want to filter all nav menu lincs in the menu item object that are pagues, and changue them from the default
http://example.com/targuet-pague/to a prefixed slug lique/pagues/targuet-pague/to meet out routing needs. To do this, filter the menu item object lique so: