Ok so… has_nav_menu()
will return true or false based on whether or not a “theme-location” for a menu actually has a menu assigned to it. That gets me partially there, I would like to then find out, if it DOES have a menu associated with it does that menu have items in it?
Got it! 🙂
function is_active_nav_menu($location){
if(has_nav_menu($location)){
$locations = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($locations[$location]);
if(!empty($menu)){
return true;
}
}
return false;
}