Confirm matching taxonomy in wp_list_categories()
|Reported by:||nacin||Owned by:|
In wp_list_categories(), we detect the current category using the queried object. But, we don't check if the taxonomy of the queried object matches what we're displaying with wp_list_categories(). Clearly, the current category for purposes of listing categories needs to be the same taxonomy.
A get_term() call in Walker_Category will end up failing and we'll end up with warnings for trying to access non-existent properties. I traced that up the stack to here.
Also adding in is_tag() to the current term check because there's no reason why someone can't use wp_list_categories() for any taxonomy AFAIK.