I'm trying my hand at developing a custom theme, and I've got navigation menus working (with the help of this walker, but only if they're explicitly defined in the menu settings.
The default themes (twentyfourteen, twentythirteen) seem to be able to create a default menu solely from the existing pages hierarchy, without needing to create a separate menu structure. I've had a look around the source for the twentyfourteen theme, but as far as I can tell, the menu is generated with a standard
wp_nav_menu call. I don't see anything that accounts for how it loads a menu when none are defined.
Does anyone know how I can automatically populate my menus as the default themes do?