I need to get all the slugs/terms - those that are used & those that are not. It's hierarchical (3-4 levels).
How to get all (used & not used) terms/slugs in hierarchical order?
This code returns 1. level slugs & ONLY other levels that ARE USED:
$locations = get_terms('location', array( 'orderby' => 'slug', 'parent' => 0, 'hide_empty' => false) );
This code returns a mess - hierarchy is all off & it's a big mess:
$locations = get_terms('location', array( 'orderby' => 'slug', 'hide_empty' => false) );