Here’s the Walker_Nav_Menu code that I have working:
It gets the main menu and outputs each menu item’s post-id in a comma delimited list.
// get menu item's content id
class pages_from_nav extends Walker_Nav_Menu
{
function start_el(&$output, $item, $depth, $args)
{
global $wp_query;
$item_output .= $item->object_id;
$item_output .= ',';
$output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args );
}
}