Want to get menu object from theme_location in WordPress? You can get menu object from theme_location by using get_nav_menu_locations() and get_term() functions. Below is the an example:
$theme_locations = get_nav_menu_locations();
$menu_obj = get_term( $theme_locations[$theme_location], 'nav_menu' );
$menu_name = $menu_obj->name;
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.