From http://wp.tutsplus.com/tutorials/creative-coding/function-examination-wp_nav_menu/