In short, wp_nav_menu()
calls upon the walk_nav_menu_tree()
function and passes along the processed arguments (including the Walker_Nav_Menu
instance to use, if provided).
walk_nav_menu_tree()
invokes the the Walker_Nav_Menu::walk()
method on the provided instance or on a new instance of the default Walker_Nav_Menu
class if none was provided.
Walker_Nav_Menu::walk()
iterates through nav menu items and contextually calls other relevant methods on the instance as necessary in order to convert the items to markup. In the case of Walker_Nav_Menu::start_el()
, whenever beginning to construct the markup for an item.
Walker_Nav_Menu
inherits it’s walk()
method from the plain ol Walker
class – see Walker::walk()
.