I want to modify all of my <li>
's class
es and id
s, but the function wp_nav_menu()
does not let me do so, so I think I need to use a walker. I am pretty new in OO, so using an object is not really easy.
I'm pretty sure I need to extend Walker
class (or Walker_Nav_Menu
class?), but I'm not sure what method to override/implement. What method of my object is being called when I pass it as an argument in wp_nav_menu( array( 'walker' => new myWalker ) )
?
I do not want to do this with filters and actions because I find it cleaner with walkers.